--- title: "ExtractFileFromPDF" slug: "extract-file-from-pdf" updated: 2026-09-09T09:08:08Z published: 2026-09-09T09:08:08Z canonical: "docs.lobstersoftware.com/extract-file-from-pdf" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # ExtractFileFromPDF | **Class name** | com.ebd.hub.datawizard.parser.ExtractFileFromPDF | | --- | --- | ## Description This Preparser is able to extract any contained file from a PDF/A file (apart from the file *ZUGFeRD-invoice.xml*). Field *Configuration* *file* is used to specify the list of possible file names (separated by semicolons). Only the first found file is returned. See the following example. ## Example Assume the following value of the parameter string. | MyInvoice.txt;Orders.csv | | --- | If both files are contained in the PDF/A, file *MyInvoice.tx*t will be extracted if it was added to the PDF first. **IMPORTANT:** When you open a PDF/A file in a viewer, it does not always display the real file names of the attached files. Let's assume you see the file name *abadoc.xml* in the viewer and specify it in the parameter string. If the actual file name is different, you will receive an error message of the following type. ```plaintext [unknown] No valid embedded file found but these are included: 'AbaDoc', 'ZUGFeRD-invoice.xml' [ExtractFileFromPDF] Exception in PreParser: java.lang.Exception: Invalid PDF/A format - unable to extract file ``` In that case, use file name "AbaDoc" instead. Optional intermediate phase before Phase 2. A preparser manipulates input data before the parser processes it; for example, to remove special characters or convert an unknown format to a supported one.