Skip to main content
Version: 9.x

Read the bookmarks

Reads the bookmarks, the outline viewers show beside the pages.

POST/forms/pdf/bookmarks
filesfile[]required

The PDFs.

passwordstring

Opens encrypted PDFs. A wrong one answers 400, and so does a missing one when the PDF has a user password.

archivesfile[]

ZIP files Gotenberg unpacks: each entry counts as a file uploaded under files.

URLs Gotenberg downloads first, as if you had uploaded the files. Each entry takes a url, and optionally extraHttpHeaders.

JSON, one entry per PDF under its file name.

The route answers directly: it ignores Gotenberg-Output-Filename, and answers 400 to the webhook headers. An error answers a status and a message: see Errors.

curl \
--request POST http://localhost:3000/forms/pdf/bookmarks \
--form files=@report.pdf
Response
{
"report.pdf": [
{
"title": "Summary",
"pageNumber": 1,
"children": [
{
"title": "Figures",
"pageNumber": 2
}
]
},
{
"title": "Appendix",
"pageNumber": 3
}
]
}

children nests bookmarks under another. The shape is the one set-bookmarks takes.