Set PDF Metadata
set_metadataUpdate an existing PDF's title, author, subject, keywords, or creator while preserving all other metadata. Optionally keep digital signatures valid via incremental update.
Instructions
Update an existing PDF's metadata (the Info dictionary). Only the given fields change; the rest are preserved. At least one of title / author / subject / keywords / creator is required. In documents with XMP (/Metadata), dc:title etc. are synchronized to prevent divergence. For signed PDFs, preserveSignatures: true updates while keeping the signatures intact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Title. | |
| author | No | Author. | |
| creator | No | Creating application name. | |
| subject | No | Subject. | |
| keywords | No | Array of keywords. | |
| inputPath | Yes | Absolute path of the PDF to edit. | |
| outputPath | No | Destination file path (absolute). When omitted, a base64 string is returned instead. | |
| returnBase64 | No | When true, include a base64 string in the result in addition to saving. | |
| preserveSignatures | No | Edit a signed PDF via an incremental update (appending) without invalidating existing signatures. Default false. The original bytes are untouched, so /ByteRange holds. Changes beyond the certification (DocMDP) permission level are refused. | |
| allowBreakingSignatures | No | When the target is digitally signed (detected via /ByteRange), the default is an error. Set true to proceed, accepting that the signatures become invalid. |