Modify PDF Metadata

Endpoint #

POST https://pixlab.davix.dev/v1/pdf

Action #

action=metadata

Description #

The Modify PDF Metadata action updates or clears metadata values stored inside a PDF document using the H2I engine (PixLab).

This action is part of the public /v1/pdf API surface. It accepts a source PDF and allows applications to update common PDF metadata fields such as title, author, subject, keywords, creator, and producer. It also supports clearing existing metadata fields before applying new values. The processed PDF is returned as a generated output through a signed URL under the public PDF output path.

This action is suitable for workflows such as:

  • updating document metadata after generation
  • replacing metadata values before distribution
  • clearing existing metadata before applying standardized values

Request Format #

Requests to /v1/pdf must use:

  • Content-Type: multipart/form-data
  • API key authentication in request headers
  • source PDF upload through the files field

For non-merge PDF actions, the first uploaded PDF file is used as the source input. This applies to action=metadata.

Parameters #

action #

Type: string
Required: Yes
Accepted value: metadata

Specifies that the request should modify metadata for the uploaded PDF document.

files #

Type: file upload (multipart/form-data)
Required: Yes

The source PDF document.

  • uploaded through the files field
  • must be a valid PDF upload
  • for this action, the first uploaded PDF file is used as the source input

cleanAllMetadata #

Type: boolean or string
Required: No
Default: false

Controls whether common existing metadata fields should be cleared before applying updates.

  • false → existing metadata is preserved unless overwritten
  • true → common metadata fields are cleared before optional updates are applied

title #

Type: string
Required: No

Sets the document title metadata field.

author #

Type: string
Required: No

Sets the author metadata field.

subject #

Type: string
Required: No

Sets the subject metadata field.

keywords #

Type: string
Required: No

Sets the keywords metadata field.

creator #

Type: string
Required: No

Sets the creator metadata field.

producer #

Type: string
Required: No

Sets the producer metadata field.

Supported Parameters #

The Modify PDF Metadata action supports the following public parameters:

ParameterDescription
actionMust be metadata
filesSource PDF upload
cleanAllMetadataClears common metadata fields before optional updates
titleDocument title
authorDocument author
subjectDocument subject
keywordsDocument keywords
creatorCreator field
producerProducer field

These are the documented public metadata parameters for /v1/pdf action=metadata.

Full cURL Example #

curl -sS -X POST "https://pixlab.davix.dev/v1/pdf" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-H "Idempotency-Key: pdf-metadata-001" \
-F "action=metadata" \
-F "files=@/path/to/document.pdf" \
-F "cleanAllMetadata=true" \
-F "title=Updated Document Title" \
-F "author=Example Author" \
-F "subject=Project Report" \
-F "keywords=report,example,pdf" \
-F "creator=Example Application" \
-F "producer=Example PDF Pipeline"

This example includes the full documented public parameter surface for the Modify PDF Metadata action:

  • action=metadata
  • source PDF upload in files
  • cleanAllMetadata
  • title
  • author
  • subject
  • keywords
  • creator
  • producer
  • optional idempotency header

Success Response #

Successful /v1/pdf requests return either a single output object or a results array, depending on the action. For public documentation, action=metadata is safest documented as a single generated PDF output returned through a signed URL. PDF output URLs are served under /pdf/<file>.

{
"url": "https://pixlab.davix.dev/pdf/updated-document.pdf",
"request_id": "req_abc123"
}

Response Fields #

url #

Signed output URL for the generated PDF with updated metadata. PDF outputs are served under the public /pdf/<file> path.

request_id #

Request identifier returned by the API when available.

Errors #

The public /v1/pdf endpoint documents the following PDF-route errors:

  • missing_field
  • invalid_parameter
  • unsupported_media_type
  • pdf_page_limit_exceeded
  • rate_limit_exceeded
  • rate_limit_store_unavailable
  • monthly_quota_exceeded
  • server_busy
  • timeout
  • pdf_tool_failed

The shared upload/error layer can also return:

  • invalid_upload
  • file_too_large
  • too_many_files
  • total_upload_exceeded

HTTP Status Codes #

  • 400 → invalid request fields or parameters
  • 413 → upload size/count limits exceeded or other request-size-related PDF limits
  • 415 → unsupported media type
  • 429 → rate limit or monthly quota exceeded
  • 503 → timeout, rate-limit store unavailable, or server busy
  • 500 → PDF processing failure

Usage Notes #

Idempotency-Key is optional and supported for retry-safe request handling. Both Idempotency-Key and X-Idempotency-Key are accepted.

All metadata fields are optional and can be provided individually.

cleanAllMetadata=true clears common metadata fields before optional updates are applied.

Updating metadata changes document metadata values without describing any content transformation behavior in the public API docs.

Output files are returned through signed URLs. Applications that need long-term storage should store generated files externally rather than treating output URLs as permanent hosting.

Was it helpful ?
Scroll to Top