L_LTFIL_APIL_INTL_ExtractAttachment(pszSrcFileName, pSrcBuffer, uSrcBufferSize, pFileOptions, pFileInfo, uFlags, pszDstFileName, ppDstBuffer, puDstBufferSize)
Extracts an attachment from the owner file.
Owner file name.
If this value is notNULL, then it must point to the name of the file on disk to parse for the attachment.
If this value isNULL, then the owner file data must be set inpSrcBuffer.
EitherpszSrcFileNameorpSrcBuffermust not beNULL, but not both.
Pointer to the memory buffer containing the data of the owner file.
If this value is notNULL, then it must contain the data of the owner file to parse for the attachment. The size of the data must be set inuSrcBufferSize.
If this value isNULL, thenpszSrcFileNamemust point to the name of the file on disk to parse for the attachment.
EitherpszSrcFileNameorpSrcBuffermust not beNULL, but not both.
Size ofpSrcBufferin bytes, if the value of the parameter passed is notNULL; otherwise, ignore.
Pointer to optional extended load options. This value cannot beNULL. The value ofpLOADFILEOPTION->nAttachment
must be set to the 1-based attachment number to extract.
Pointer to aFILEINFOstructure. This structure may contain file information used in loading an image, or it may be updated with information about the file being loaded.
This value can beNULL.
Refer toL_LoadFilefor more information.
保留以供将来使用。用0。
Destination file name.
If this value is notNULL, then it must contain the name of the file on disk that will be created or overwritten with the attachment file data, if found.
If this value isNULL, then the attachment file data will be set inppDstBuffer.
EitherpszDstFileNameorppDstBuffermust not beNULL, but not both.
Pointer to the variable that will contain the attachment file data, if found.
If this value is notNULL, then it will contain the attachment file data and the size in bytes will be set inpuDstBufferSize. The application code must callL_FreeBufferon the pointer when it is no longer needed.
If this value isNULL, then the attachment file data is saved to the name of the file set inpszDstFileName.
Size of the memory buffer in _ppDstBuffer_, if the value of the parameter passed was notNULL.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
ERROR_ATTACHMENT_NOT_FOUND | The attachment number specified inpFileOptions->nAttachment was not found in the file. |
ERROR_PDF_INVALID_PASSWORD | The owner file is encrypted. Pass the correct password usingL_SetPDFOptionsand try again. |
ERROR_FEATURE_NOT_SUPPORTED | The file is a format that does not support attachments (such as PNG or BMP), or LEADTOOLS does not support reading attachments of this type of format. |
< 1 | An error occurred. Refer toReturn Codes. |
UseL_FILEINFO.nAttachmentCount
to quickly determine the number of attachments found in a file.
UseL_ReadFileAttachmentsto obtain the number and properties of all attachments found in a file.
Win32, x64, Linux.
Help Collections
Raster.NET|C API|C++ Class Library|HTML5 JavaScript
Document.NET|C API|C++ Class Library|HTML5 JavaScript
Medical.NET|C API|C++ Class Library|HTML5 JavaScript
Medical Web Viewer.NET
188宝金博怎么下载
Media Foundation.NET|C API|Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.