Skip to main content

Read Metadata

Extracts metadata (Exif, XMP, PDF properties, etc.) from one or more PDF files using ExifTool. Returns a JSON object keyed by filename.

See the PDF Engines module configuration for engine selection flags.

ExifTool Tags

The returned keys correspond to ExifTool tag names. See the ExifTool Tag Names documentation for reference on what fields might be returned.

Basics

POST/forms/pdfengines/metadata/read
Headers
Gotenberg-Tracestring
A custom request ID to identify the request in the logs; overrides the default UUID.
Form Files
filesfile[]required
PDF files to analyze.
cURL
curl \
--request POST http://localhost:3000/forms/pdfengines/metadata/read \
--form files=@/path/to/invoice.pdf \
--form files=@/path/to/report.pdf
The metadata in JSON format.
Content-Type: application/json; charset=UTF-8
Content-Length: {content-length}
Gotenberg-Trace: {trace}
Body:
{
"invoice.pdf": {
"PDFVersion": 1.7,
"Author": "Gotenberg",
"Title": "Invoice #001",
"CreateDate": "2024:03:05 09:15:32Z",
"PageCount": 2,
"Producer": "Gotenberg",
"MIMEType": "application/pdf"
},
"report.pdf": {
"PDFVersion": 1.4,
"Author": "John Doe",
"PageCount": 15
// ...
}
}

What's Next?

Inspect document structure with Read bookmarks, or set your own with Write metadata.