Read Bookmarks
Extracts bookmarks (the document outline / table of contents) from one or more PDF files. Returns a JSON object keyed by filename, where each bookmark contains a title, a page number, and optional children.
POST/forms/pdfengines/bookmarks/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.
Example Request
cURL
curl \
--request POST http://localhost:3000/forms/pdfengines/bookmarks/read \
--form files=@/path/to/document.pdf \
--form files=@/path/to/report.pdf
Responses
- 200
- 400
- 503
The bookmarks in JSON format.
Content-Type: application/json; charset=UTF-8
Content-Length: {content-length}
Gotenberg-Trace: {trace}
Body:
{
"document.pdf": [
{
"title": "Chapter 1",
"page": 1,
"children": [
{
"title": "Section 1.1",
"page": 3,
"children": []
}
]
},
{
"title": "Chapter 2",
"page": 10,
"children": []
}
],
"report.pdf": [
{
"title": "Introduction",
"page": 1,
"children": []
}
]
}
The request had one ore more invalid form fields.
Content-Type: text/plain; charset=UTF-8
Gotenberg-Trace: {trace}
Body: {error}
The request did not complete within the configured maximum duration.
Content-Type: text/plain; charset=UTF-8
Gotenberg-Trace: {trace}
Body: Service Unavailable
