Skip to content
DemoFAQ

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub

PDF Request Options

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.

PDF Merge

Used by POST /api/v1/process/pdf/merge.

ParameterTypePurpose
pageRangesString or String[]Page ranges to process, starting from page 1. Examples: 1, 1-3, 1,3-5. Empty or all means all pages.
passwordsArrayPer-file password list. Use null or an empty string for files without a password.
outputFileNameStringOptional output filename used as the preferred download filename.

PDF Split

Used by POST /api/v1/process/pdf/split.

ParameterTypePurpose
rangesString[]Split ranges. Example: ["1-3","4-6"].
passwordStringSource PDF open password.
outputFileNameStringOptional output filename used as the preferred download filename.

PDF Extract

Used by POST /api/v1/process/pdf/extract.

ParameterTypePurpose
pagesString or Number[]Pages to extract. Examples: 1, 1,3-5, [1,3,4,5], or all when supported.
passwordStringSource PDF open password.
outputFileNameStringOptional output filename used as the preferred download filename.

Insert PDF Pages

Used by POST /api/v1/process/pdf/insert-from-pdf.

ParameterTypePurpose
indexNumberOne-based insertion position.
sourcePageRangesString[]Page ranges selected from the PDF being inserted. Empty means all pages.
targetPasswordStringOpen password for the main target PDF.
insertPasswordStringOpen password for the PDF being inserted.
outputFileNameStringOptional output filename used as the preferred download filename.

Insert Blank Pages

Used by POST /api/v1/process/pdf/insert-blank.

ParameterTypePurpose
indexNumberOne-based insertion position.
countNumberNumber of blank pages to insert.
widthNumberBlank page width in points.
heightNumberBlank page height in points.
targetPasswordStringOpen password for the target PDF.
outputFileNameStringOptional output filename used as the preferred download filename.

PDF Delete Pages

Used by POST /api/v1/process/pdf/delete.

ParameterTypePurpose
pageRangesStringPage ranges to delete. Examples: 1, 1-3, 1,3-5. Empty means all pages.
passwordStringSource PDF open password.
outputFileNameStringOptional output filename used as the preferred download filename.

PDF Rotate Pages

Used by POST /api/v1/process/pdf/rotate.

ParameterTypePurpose
pageRangesStringPage ranges to rotate. Examples: 1, 1-3, 1,3-5. Empty or all means all pages.
angleNumberRotation angle. Common values: 90, 180, 270.
passwordStringSource PDF open password.
outputFileNameStringOptional output filename used as the preferred download filename.

PDF Standards Conversion

Used by POST /api/v1/process/pdf/pdfa.

ParameterTypePurpose
standardStringTarget PDF standard or conformance profile accepted by the private SDK.
passwordStringSource PDF open password.
outputFileNameStringOptional output filename used as the preferred download filename.

PDF Encryption

Used by POST /api/v1/process/pdf/encrypt.

ParameterTypePurpose
userPasswordStringPassword required to open the encrypted PDF.
ownerPasswordStringOwner password used to manage permissions.
permissionsObjectPermission object forwarded to the SDK.
allowPrintBooleanShortcut mapped to permissions.allowPrint.
allowCopyBooleanShortcut mapped to permissions.allowCopy.
allowDocumentChangesBooleanShortcut mapped to permissions.allowDocumentChanges.
allowDocumentAssemblyBooleanShortcut mapped to permissions.allowDocumentAssembly.
allowCommentingBooleanShortcut mapped to permissions.allowCommenting.
allowFormFieldEntryBooleanShortcut mapped to permissions.allowFormFieldEntry.
outputFileNameStringOptional output filename used as the preferred download filename.

PDF Decryption

Used by POST /api/v1/process/pdf/decrypt.

ParameterTypePurpose
passwordStringSource PDF open password.
outputFileNameStringOptional output filename used as the preferred download filename.

Add Watermark

Used by POST /api/v1/process/pdf/watermark/add.

ParameterTypePurpose
typeString or IntegerWatermark type, such as text or image, or an equivalent value supported by the SDK.
textStringWatermark text.
fontSizeNumberText watermark font size.
fontColorStringText color, for example #D32F2F.
opacityNumberWatermark opacity. Common range: 0 to 1.
rotationNumberWatermark rotation angle in degrees.
horizalignStringHorizontal alignment, such as left, center, or right.
vertalignStringVertical alignment, such as top, center, or bottom.
horizOffsetNumberHorizontal offset in points.
vertOffsetNumberVertical offset in points.
horizontalSpacingNumberHorizontal spacing for repeated watermarks.
verticalSpacingNumberVertical spacing for repeated watermarks.
fullScreenBooleanWhether to tile the watermark across the page.
pagesString or Number[]Pages to process. Examples: 1, 1,3-5, [1,3,4,5], or all when supported.
passwordStringSource PDF open password.
outputFileNameStringOptional output filename used as the preferred download filename.

Remove Watermark

Used by POST /api/v1/process/pdf/watermark/remove.

ParameterTypePurpose
pagesString or Number[]Pages to process. Examples: 1, 1,3-5, [1,3,4,5], or all when supported.
modeStringRemoval mode. ComPDF Web sends tagged; ComPDF Self-hosted uses untagged when specific pages are provided.
passwordStringSource PDF open password.
outputFileNameStringOptional output filename used as the preferred download filename.

PDF Compression

Used by POST /api/v1/process/pdf/compress.

ParameterTypePurpose
profileStringCompression preset. When aggressive is used without optimizeFlags, the middle layer derives the flags from imageQuality.
optimizeFlagsString[]Optimization actions, such as RMEMBFONT, RMANNOT, RMDOCINFO, and RMMEDTADATA.
imageQualityNumberCompression image quality from 0 to 100. Presets use 30, 60, or 80.
colorImageUpperPpiNumberColor image maximum PPI.
colorImageTargetPpiNumberColor image target PPI.
colorImageCompressAlgorithmStringColor image compression algorithm, such as jpeg or flate.
colorImageQualityNumberColor image quality from 0 to 100.
grayscaleImageUpperPpiNumberGrayscale image maximum PPI.
grayscaleImageTargetPpiNumberGrayscale image target PPI.
monochromeImageUpperPpiNumberMonochrome image maximum PPI.
monochromeImageTargetPpiNumberMonochrome image target PPI.
monochromeImageCompressAlgorithmStringMonochrome image compression algorithm, such as jbig2 or flate.
passwordStringSource PDF open password.
outputFileNameStringOptional output filename used as the preferred download filename.

HTML to PDF

Used by POST /api/v1/process/pdf/generation/html-to-pdf.

ParameterTypePurpose
htmlStringHTML source string. Mutually optional with the htmlFile form-data field and htmlUrl.
htmlUrlStringHTTP or HTTPS URL of the HTML source.
baseUriStringBase URI used to resolve relative resources.
pageSizeObjectPage width and height in points.
outputFileNameStringOptional output filename used as the preferred download filename.

Template to PDF

Used by POST /api/v1/process/pdf/generation/template-to-pdf.

ParameterTypePurpose
templateStringHTML template string. Mutually optional with the templateFile form-data field.
dataObject or StringTemplate data. Mutually optional with the dataFile form-data field.
baseUriStringBase URI used to resolve relative resources.
pageSizeObjectPage width and height in points.
outputFileNameStringOptional output filename used as the preferred download filename.

Async PDF Task

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.