Inspect PDF metadata
inspect_pdfRetrieve a PDF's structural metadata (version, page count, encryption, signature count, attachments) and run pass/fail checks for PDF/A, signing, encryption, placeholders, and more.
Instructions
Read-only facts about a PDF: version, pageCount, encryption, pdfA claim (the claim, not its validity — use veraPDF for that), signatureCount, hasSignaturePlaceholder, attachments[], info; presence-gated dss / docTimestampCount / trapped; signatures:true lists every field (subFilter, isDocTimestamp, isPlaceholder, byteRange, vriKey); pages:true adds per-page sizes and boxes. check:[…] turns it into a CI assertion ('pdfa','signed','encrypted','placeholder','attachments','dss','docTimestamp','trapped') → checks (requested keys only) + checksPassed. Encrypted sources: pass password. Token-frugal: verbosity:'summary', fields:[…].
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| check | No | CI assertions → checks (requested keys only) + checksPassed (all hold). 'signed' = a signature field with signed content exists (structural; validity is verify_pdf's job), 'placeholder' = an unsigned placeholder exists, 'dss' = /DSS present, 'docTimestamp' = a /DocTimeStamp exists, 'trapped' = /Info /Trapped set, 'annotations' = at least one page annotation exists. | |
| pages | No | When true, include per-page metadata in the response. | |
| fields | No | Optional dot-path projection applied to the structured result (e.g. ['pageCount','signatureCount']). Composes after verbosity. Unknown paths are omitted. | |
| password | No | Password (user or owner) of an encrypted source. Never logged or echoed. | |
| pdfBase64 | Yes | Base64-encoded PDF bytes to inspect. | |
| verbosity | No | 'full' (default) or 'summary' (scalars only: version, pageCount, encryption, pdfA, signatureCount, hasSignaturePlaceholder, attachmentCount, + docTimestampCount / trapped / checksPassed when present; arrays and dss dropped). | full |
| signatures | No | When true, include a signatures[] array describing every signature field (field name, SubFilter, document-timestamp flag, placeholder flag, ByteRange, /Contents length, /VRI key). Off by default to keep responses compact. | |
| annotations | No | When true, include an annotations[] array listing every page annotation (/Annots: links, text notes, highlights, shapes, widgets…) with its 0-based page, subtype, rect and, when present, contents (truncated to 200 chars), title, color, quadPoints and link url. Off by default to keep responses compact. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dss | No | Document Security Store summary (ISO 32000-2 §12.8.4.3), present only when the catalog has a /DSS. | |
| info | No | Document /Info dictionary entries decoded as strings. | |
| pdfA | No | Detected PDF/A claim (e.g. '1B', '2B', '2U', '3B') from XMP metadata, or null when absent. | |
| checks | No | One boolean per REQUESTED check (keys = the check[] you passed, nothing else). | |
| perPage | No | ||
| trapped | No | /Info /Trapped flag, present only when the document carries one. | |
| version | No | PDF version (e.g. "1.7"). | |
| pageCount | No | ||
| encryption | No | ||
| pageLabels | No | Logical page-numbering ranges from the /PageLabels number tree (ISO 32000-1 §12.4.2), or absent when the document has none. Each range gives the 0-based first page, numbering style, optional prefix and start value. | |
| signatures | No | Signature fields (opt-in via the `signatures` input). Document timestamps are listed inline with isDocTimestamp=true. | |
| annotations | No | Page annotations (opt-in via the `annotations` input), in page order then /Annots order. Only the keys the annotation actually carries are emitted. | |
| attachments | No | Embedded files exposed via /Names → /EmbeddedFiles (PDF/A-3, Factur-X). | |
| checksPassed | No | Present when check[] was supplied: true when every requested check holds. | |
| encryptionInfo | No | Precise Standard Security Handler details (pdfnative v1.6.0), present only when the document is encrypted and was opened successfully. Objects served by the reader are already decrypted. | |
| signatureCount | No | ||
| annotationCount | No | Total number of page annotations (opt-in via the `annotations` input). | |
| attachmentCount | No | summary only: number of embedded files. | |
| docTimestampCount | No | Number of /DocTimeStamp signature fields, present only when at least one exists. | |
| hasSignaturePlaceholder | No | True when at least one signature widget exists with empty /Contents — i.e. an unsigned placeholder awaiting `sign_pdf`. |