PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
PDF APIs accept a request JSON string through multipart/form-data. Use only the fields listed for the selected function; fields from different functions are not interchangeable.
For PDF tool endpoints, if request is omitted, other non-file form-data fields may be forwarded as the request object.
Used by POST /api/v1/process/pdf/merge.
| Parameter | Type | Purpose |
|---|---|---|
pageRanges | String or String[] | Page ranges to process, starting from page 1. Examples: 1, 1-3, 1,3-5. Empty or all means all pages. |
passwords | Array | Per-file password list. Use null or an empty string for files without a password. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/process/pdf/split.
| Parameter | Type | Purpose |
|---|---|---|
ranges | String[] | Split ranges. Example: ["1-3","4-6"]. |
password | String | Source PDF open password. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/process/pdf/extract.
| Parameter | Type | Purpose |
|---|---|---|
pages | String or Number[] | Pages to extract. Examples: 1, 1,3-5, [1,3,4,5], or all when supported. |
password | String | Source PDF open password. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/process/pdf/insert-from-pdf.
| Parameter | Type | Purpose |
|---|---|---|
index | Number | One-based insertion position. |
sourcePageRanges | String[] | Page ranges selected from the PDF being inserted. Empty means all pages. |
targetPassword | String | Open password for the main target PDF. |
insertPassword | String | Open password for the PDF being inserted. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/process/pdf/insert-blank.
| Parameter | Type | Purpose |
|---|---|---|
index | Number | One-based insertion position. |
count | Number | Number of blank pages to insert. |
width | Number | Blank page width in points. |
height | Number | Blank page height in points. |
targetPassword | String | Open password for the target PDF. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/process/pdf/delete.
| Parameter | Type | Purpose |
|---|---|---|
pageRanges | String | Page ranges to delete. Examples: 1, 1-3, 1,3-5. Empty means all pages. |
password | String | Source PDF open password. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/process/pdf/rotate.
| Parameter | Type | Purpose |
|---|---|---|
pageRanges | String | Page ranges to rotate. Examples: 1, 1-3, 1,3-5. Empty or all means all pages. |
angle | Number | Rotation angle. Common values: 90, 180, 270. |
password | String | Source PDF open password. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/process/pdf/pdfa.
| Parameter | Type | Purpose |
|---|---|---|
standard | String | Target PDF standard or conformance profile accepted by the private SDK. |
password | String | Source PDF open password. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/process/pdf/encrypt.
| Parameter | Type | Purpose |
|---|---|---|
userPassword | String | Password required to open the encrypted PDF. |
ownerPassword | String | Owner password used to manage permissions. |
permissions | Object | Permission object forwarded to the SDK. |
allowPrint | Boolean | Shortcut mapped to permissions.allowPrint. |
allowCopy | Boolean | Shortcut mapped to permissions.allowCopy. |
allowDocumentChanges | Boolean | Shortcut mapped to permissions.allowDocumentChanges. |
allowDocumentAssembly | Boolean | Shortcut mapped to permissions.allowDocumentAssembly. |
allowCommenting | Boolean | Shortcut mapped to permissions.allowCommenting. |
allowFormFieldEntry | Boolean | Shortcut mapped to permissions.allowFormFieldEntry. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/process/pdf/decrypt.
| Parameter | Type | Purpose |
|---|---|---|
password | String | Source PDF open password. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/process/pdf/watermark/add.
| Parameter | Type | Purpose |
|---|---|---|
type | String or Integer | Watermark type, such as text or image, or an equivalent value supported by the SDK. |
text | String | Watermark text. |
fontSize | Number | Text watermark font size. |
fontColor | String | Text color, for example #D32F2F. |
opacity | Number | Watermark opacity. Common range: 0 to 1. |
rotation | Number | Watermark rotation angle in degrees. |
horizalign | String | Horizontal alignment, such as left, center, or right. |
vertalign | String | Vertical alignment, such as top, center, or bottom. |
horizOffset | Number | Horizontal offset in points. |
vertOffset | Number | Vertical offset in points. |
horizontalSpacing | Number | Horizontal spacing for repeated watermarks. |
verticalSpacing | Number | Vertical spacing for repeated watermarks. |
fullScreen | Boolean | Whether to tile the watermark across the page. |
pages | String or Number[] | Pages to process. Examples: 1, 1,3-5, [1,3,4,5], or all when supported. |
password | String | Source PDF open password. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/process/pdf/watermark/remove.
| Parameter | Type | Purpose |
|---|---|---|
pages | String or Number[] | Pages to process. Examples: 1, 1,3-5, [1,3,4,5], or all when supported. |
mode | String | Removal mode. ComPDF Web sends tagged; ComPDF Self-hosted uses untagged when specific pages are provided. |
password | String | Source PDF open password. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/process/pdf/compress.
| Parameter | Type | Purpose |
|---|---|---|
profile | String | Compression preset. When aggressive is used without optimizeFlags, the middle layer derives the flags from imageQuality. |
optimizeFlags | String[] | Optimization actions, such as RMEMBFONT, RMANNOT, RMDOCINFO, and RMMEDTADATA. |
imageQuality | Number | Compression image quality from 0 to 100. Presets use 30, 60, or 80. |
colorImageUpperPpi | Number | Color image maximum PPI. |
colorImageTargetPpi | Number | Color image target PPI. |
colorImageCompressAlgorithm | String | Color image compression algorithm, such as jpeg or flate. |
colorImageQuality | Number | Color image quality from 0 to 100. |
grayscaleImageUpperPpi | Number | Grayscale image maximum PPI. |
grayscaleImageTargetPpi | Number | Grayscale image target PPI. |
monochromeImageUpperPpi | Number | Monochrome image maximum PPI. |
monochromeImageTargetPpi | Number | Monochrome image target PPI. |
monochromeImageCompressAlgorithm | String | Monochrome image compression algorithm, such as jbig2 or flate. |
password | String | Source PDF open password. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/process/pdf/generation/html-to-pdf.
| Parameter | Type | Purpose |
|---|---|---|
html | String | HTML source string. Mutually optional with the htmlFile form-data field and htmlUrl. |
htmlUrl | String | HTTP or HTTPS URL of the HTML source. |
baseUri | String | Base URI used to resolve relative resources. |
pageSize | Object | Page width and height in points. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/process/pdf/generation/template-to-pdf.
| Parameter | Type | Purpose |
|---|---|---|
template | String | HTML template string. Mutually optional with the templateFile form-data field. |
data | Object or String | Template data. Mutually optional with the dataFile form-data field. |
baseUri | String | Base URI used to resolve relative resources. |
pageSize | Object | Page width and height in points. |
outputFileName | String | Optional output filename used as the preferred download filename. |
Used by POST /api/v1/task/{source}/{target} when creating a PDF tool or PDF generation task.
The asynchronous endpoint does not define a separate combined request schema. Use the fields from the section that matches the selected {source}/{target} PDF function. Do not combine parameters from unrelated functions.