Guides / Extract

Extract PDF attachments

POST /v1/pdf/attachments  · 

Pull embedded files out of a PDF: ZUGFeRD/Factur-X invoice XML, attached CSVs, images or sub-PDFs — as JSON (text inline, binary base64) or a ZIP. E-invoice attachments are flagged.

Parameters

NameTypeDescription
filefile · requiredPDF with embedded files.
outputstring · optionaljson (default) or zip.
namestring · optionalOnly this attachment, by filename.

Example request

curl -X POST https://api.bigapi.dev/v1/pdf/attachments -H 'Authorization: Bearer $KEY' -F 'file=@invoice.pdf'

Example response

{
  "count": 2,
  "has_einvoice": true,
  "attachments": [
    { "filename": "factur-x.xml", "content_type": "text/xml", "size_bytes": 4213,
      "is_einvoice": true, "text": "<?xml version=\"1.0\"?><rsm:CrossIndustryInvoice>…" },
    { "filename": "delivery-note.pdf", "content_type": "application/pdf",
      "size_bytes": 88120, "is_einvoice": false, "base64": "JVBERi0xLjcK…" }
  ]
}

E-invoices

ZUGFeRD, Factur-X and similar formats carry their structured data as an XML attachment inside the PDF. The response flags those files with is_einvoice, so an agent can go straight to the machine-readable data instead of parsing the printed page.

Related guides