Combine PDFs

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Combines multiple PDF documents into a single PDF, returning a status URL that can be polled for the download link once the job completes.


Input Files: Provide exactly one of files or urls to specify the input documents.

Endpoints

OAuth Scope

ZohoWriter.documentEditor.ALLZohoWriter.merge.ALLWorkDrive.organization.ALLCopied!

Request Example

cURL
cURL
Deluge
Copied!
curl --request POST \
  --url https://www.zohoapis.com/writer/api/v1/documents/pdf/combine \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: multipart/form-data' \
  -F 'files=@file_path' \
  -F 'urls=https://zylker.com/file1.pdf,https://zylker.com/file2.pdf' \
  -F 'output_settings={
  "name": "combined.pdf"
}' \
  -F 'input_options={
  "1": {
    "page_ranges": "3,5,7"
  },
  "2": {
    "page_ranges": "1-3,5"
  }
}' \
  -F 'team_id=6153000000123456'

Request Body

multipart/form-data
filesbinary(Optional)

One or more PDF files to combine, uploaded from local storage. Between 2 and 20 input files can be combined at once, each up to 25 MB, with a combined total input size of no more than 100 MB. Supported formats: pdf.

urlsstring(Optional)

A comma-separated list of publicly accessible URLs pointing to the PDF files to combine. Between 2 and 20 input files can be combined at once, each up to 25 MB, with a combined total input size of no more than 100 MB. Supported formats: pdf.

output_settingsJSON Object(Optional)

Controls the name, page numbering, and optional password protection of the combined output file.

Hide Sub-Attributes
namestring(Optional)

The filename for the combined output file. If the .pdf extension is omitted, it is appended automatically.

Default Value :output.pdfoutput.pdfCopied!
Maximum Length :255255Copied!
page_number_settingsJSON Object(Optional)

Page numbering configuration applied to the combined PDF.

Hide Sub-Attributes
sectionsJSON Array(Required)

A list of configuration blocks, each defining how page numbers are inserted for pages within a given range.

Show Sub-Attributes
rangestring(Optional)

The page range this section's numbering configuration applies to.

Maximum Length :500500Copied!
numbering_configJSON Object(Optional)

Controls the numbering style and starting value for the section.

Show Sub-Attributes
typestring(Optional)

The numbering style used to render the page number.

Allowed Values :
Show Values
1Copied!
aCopied!
ACopied!
iCopied!
ICopied!
Copied!Copy all as JSON Array
startinteger(Optional)

The page number value to start counting from for this section.

formatJSON Object(Optional)

Font formatting applied to the page number text.

Show Sub-Attributes
fontJSON Object(Optional)

The font used to render the page number text.

Show Sub-Attributes
namestring(Optional)

The font family used for the page number text.

Maximum Length :100100Copied!
sizeinteger(Optional)

The font size, in points, used for the page number text.

stylestring(Optional)

The font style applied to the page number text.

Maximum Length :255255Copied!
colorstring(Optional)

The color of the page number text, as a CSS color value.

Maximum Length :5050Copied!
headerJSON Object(Optional)

Header text placement for the section. left, center, and right each accept an independent text template and offsets.

Show Sub-Attributes
leftJSON Object(Optional)

Header content aligned to the left margin.

Show Sub-Attributes
textstring(Optional)

The text template to render, which can include placeholders such as <> and <>.

Maximum Length :255255Copied!
offsetsJSON Object(Optional)

Pixel offsets controlling the placement of the text within the page margin.

Show Sub-Attributes
topinteger(Optional)

Offset from the top of the page, in pixels.

leftinteger(Optional)

Offset from the left of the page, in pixels.

rightinteger(Optional)

Offset from the right of the page, in pixels.

bottominteger(Optional)

Offset from the bottom of the page, in pixels.

centerJSON Object(Optional)

Header content aligned to the center.

Show Sub-Attributes
textstring(Optional)

The text template to render, which can include placeholders such as <> and <>.

Maximum Length :255255Copied!
offsetsJSON Object(Optional)

Pixel offsets controlling the placement of the text within the page margin.

Show Sub-Attributes
topinteger(Optional)

Offset from the top of the page, in pixels.

leftinteger(Optional)

Offset from the left of the page, in pixels.

rightinteger(Optional)

Offset from the right of the page, in pixels.

bottominteger(Optional)

Offset from the bottom of the page, in pixels.

rightJSON Object(Optional)

Header content aligned to the right margin.

Show Sub-Attributes
textstring(Optional)

The text template to render, which can include placeholders such as <> and <>.

Maximum Length :255255Copied!
offsetsJSON Object(Optional)

Pixel offsets controlling the placement of the text within the page margin.

Show Sub-Attributes
topinteger(Optional)

Offset from the top of the page, in pixels.

leftinteger(Optional)

Offset from the left of the page, in pixels.

rightinteger(Optional)

Offset from the right of the page, in pixels.

bottominteger(Optional)

Offset from the bottom of the page, in pixels.

footerJSON Object(Optional)

Footer text placement for the section. left, center, and right each accept an independent text template and offsets.

Show Sub-Attributes
leftJSON Object(Optional)

Footer content aligned to the left margin.

Show Sub-Attributes
textstring(Optional)

The text template to render, which can include placeholders such as <> and <>.

Maximum Length :255255Copied!
offsetsJSON Object(Optional)

Pixel offsets controlling the placement of the text within the page margin.

Show Sub-Attributes
topinteger(Optional)

Offset from the top of the page, in pixels.

leftinteger(Optional)

Offset from the left of the page, in pixels.

rightinteger(Optional)

Offset from the right of the page, in pixels.

bottominteger(Optional)

Offset from the bottom of the page, in pixels.

centerJSON Object(Optional)

Footer content aligned to the center.

Show Sub-Attributes
textstring(Optional)

The text template to render, which can include placeholders such as <> and <>.

Maximum Length :255255Copied!
offsetsJSON Object(Optional)

Pixel offsets controlling the placement of the text within the page margin.

Show Sub-Attributes
topinteger(Optional)

Offset from the top of the page, in pixels.

leftinteger(Optional)

Offset from the left of the page, in pixels.

rightinteger(Optional)

Offset from the right of the page, in pixels.

bottominteger(Optional)

Offset from the bottom of the page, in pixels.

rightJSON Object(Optional)

Footer content aligned to the right margin.

Show Sub-Attributes
textstring(Optional)

The text template to render, which can include placeholders such as <> and <>.

Maximum Length :255255Copied!
offsetsJSON Object(Optional)

Pixel offsets controlling the placement of the text within the page margin.

Show Sub-Attributes
topinteger(Optional)

Offset from the top of the page, in pixels.

leftinteger(Optional)

Offset from the left of the page, in pixels.

rightinteger(Optional)

Offset from the right of the page, in pixels.

bottominteger(Optional)

Offset from the bottom of the page, in pixels.

passwordstring(Optional)

A password required to open the combined PDF. When set, the output file is encrypted and viewers must enter this password to access it.

Minimum Length :66Copied!
Maximum Length :255255Copied!
encryption_algorithmstring(Optional)

The encryption algorithm used to protect the output PDF when password or restrictions is set.

Allowed Values :
Show Values
AES128Copied!
AES256Copied!
RC4128Copied!
Copied!Copy all as JSON Array
Default Value :AES128AES128Copied!
restrictionsJSON Object(Optional)

Applies usage restrictions to the combined PDF. Unlike password, which controls opening the document, restrictions limits what an authenticated viewer can do with it.

Hide Sub-Attributes
passwordstring(Optional)

An owner password that enforces the restrictions. Required when setting permissions.

Minimum Length :66Copied!
Maximum Length :255255Copied!
permissionsarray(Optional)

A list of operations to disable on the combined PDF. Accepted values: document.copy, document.copy.accessibility, document.edit, document.fill, document.print, document.print.low_quality, document.annotate, document.assemble_document.

input_optionsJSON Object(Optional)

Selects specific pages or page ranges to include from each input file, keyed by the 1-based position of the file in files or urls. Use comma-separated numbers (e.g. 3,5,7) for specific pages, or a hyphenated range (e.g. 1-3) for a range of pages. Example: {"1": {"page_ranges": "3,5,7"}, "2": {"page_ranges": "1-3,5"}}.

Hide Sub-Attributes
team_idstring(Optional)

The identifier of a specific Zoho WorkDrive team to use for credit usage calculation. If the authenticated user belongs to multiple teams, this parameter selects which team's credits are consumed. When omitted, the user's preferred team is used.

Body Parameters

Copied!
// Note: payload contains multiple type attributes

// type: file
files = <file>

// type: string
urls = https://zylker.com/file1.pdf,https://zylker.com/file2.pdf

// type: object
output_settings = {
  "name": "combined.pdf"
}

// type: object
input_options = {
  "1": {
    "page_ranges": "3,5,7"
  },
  "2": {
    "page_ranges": "1-3,5"
  }
}

// type: string
team_id = 6153000000123456
Show full

Response Example

200
Copied!
  {
    "status": "inprogress",
    "status_check_url": "https://writer.zoho.com/writer/api/v1/documents/pdf/combine/job/f931a01183b33"
  }
                
Show full