PDF Document Tasks
PDF Document tasks are used to perform operations on PDF documents.
PDF Merge Task
task: "PdfDocument/Merge@1"
name: mergePdfs
inputs:
documents:
- fileUrl: "https://example.com/document1.pdf"
pageNumbers: [1, 3, 5] # Optional - merges only specified pages
- documentStream: !!binary | # New input stream option
<base64-encoded-stream>
pageNumbers: [2, 4] # Optional - merges only specified pages
outputs:
- name: documentStream
mapping: "documentStream"
Attributes
Input Attributes
| Attribute | Type | Required | Description |
|---|---|---|---|
documents | array | Yes | Array of documents to merge |
documents[].fileUrl | string | No | URL of the PDF file to merge |
documents[].documentStream | binary | No | Stream of the PDF document to merge |
documents[].pageNumbers | number[] | No | Array of page numbers to include from this document. If omitted, all pages will be merged |
Output Attributes
| Attribute | Type | Description |
|---|---|---|
documentStream | Stream | The resulting merged PDF document as a binary stream |