THotPDF.ExtractEmbeddedFileBytes Method
Method summary: THotPDF.ExtractEmbeddedFileBytes Method
Declaration
function ExtractEmbeddedFileBytes(const AFileName: AnsiString; out ABytes : TBytes): Boolean;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
AFileName | Embedded file name as stored in the loaded document name tree |
ABytes | Receives the embedded file stream bytes when the method returns True |
Return value
Returns True when the requested embedded file bytes are found and copied
Usage notes
- The method reads the EmbeddedFile stream from the loaded object graph and restores the stream position after copying
- Use this method for general PDF embedded files and use ExtractFacturXXML for the detected hybrid invoice XML
- The output byte array is cleared when the embedded file cannot be found
Related APIs
- THotPDF.GetLoadedEmbeddedFileSpec Method
- THotPDF.ExtractFacturXXML Method
- THotPDF.DetectFacturXInvoice Method