Reads the properties of the attachments embedded in the specified stream.
public CodecsAttachments ReadAttachments(
Stream stream
)
Public Function ReadAttachments(
ByVal stream As Stream
) As CodecsAttachments
public:
CodecsAttachments^ ReadAttachments(
Stream^ stream
)
stream
Stream containing the owner file that may contain embedded attachments.
Collection of CodecsAttachment objects containing the properties of any attachments found. If the owner file neither contains nor supports attachments, then an empty collection is returned.
This method returns an empty collection in the following situations:
The number of attachment items returned by this method is the same as the CodecsImageInfo.AttachmentCount value of the object returned by GetInformation.
Each CodecsAttachment contains the properties of its attachment such as its FileName, FileLength, and other extra information provided by the owner document.
Use ExtractAttachment to extract the binary content of an attachment file onto an output disk file or stream for further processing. Examples of further processing include calling GetInformation or Load.
LEADTOOLS supports reading the attachments embedded in the following file formats:
PDF files support embedded attachments of any number and file format (PDF, TIFF, XML, etc). PDF files can also be created as a portfolio which contains multiple files assembled into an integrated unit. In these types of documents, the file contains a single generic help page with text such as "For the best experience, open this PDF portfolio in a compatible viewer" and any number of attachments and a schema to control how to view the document. The value of CodecsImageInfo.IsPortfolio will be true if the file is a PDF portfolio; it is up to the application to determine how to further handle the file.
For an example, refer to ReadAttachments(string).
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
Multimedia
Direct Show .NET | C API | Filters
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
Imaging, Medical, and Document