Stirling PDF icon

Stirling PDF

Merged API: Stirling PDF - Processing API + Stirling PDF - Management API + Stirling PDF - System API

Actions260

General → Edit Table Of Contents

AI-generated

Summary

Edit or append bookmarks (table of contents) in a PDF file by providing a JSON bookmark structure and specifying the PDF input either as binary data or a server-side file ID.

Inputs

  • Input Binary Field Name (File Input) — Name of the binary property containing the PDF file data to modify.
  • File Id — ID of a server-side PDF file to edit, used instead of binary input if the file was processed asynchronously before.
  • Bookmark Data — Bookmarks structured in JSON format to set or append to the PDF's table of contents.
  • Replace Existing — Boolean indicating whether to replace existing bookmarks (if true) or append to them (if false).
  • Request Options — Advanced HTTP request options including batching, proxy, SSL validation override, and timeout settings.

Output shape

a single JSON object containing the updated PDF or confirmation details

Supports input of PDF data via binary or server file ID. Replacement vs append of bookmarks is controlled by the 'Replace Existing' parameter. Request options affect how API calls are performed but not the structure of the returned data.

Examples

Example 1: Edit PDF bookmarks using a binary file input, replacing existing bookmarks, with a specific JSON bookmark structure.

Set the binary property name to the file input, provide bookmarkData JSON, set replaceExisting to true.

Example 2: Append bookmarks to a previously uploaded PDF using its File ID.

Provide the fileId string, JSON bookmarkData, and set replaceExisting to false or leave default.

Links

Discussion