Conversion Input
SOURCE [SOURCE ...]
Supply one or more existing local PDF files. Files are added in the order supplied. URLs and standard input are not accepted by this converter.
- Example:
-
-
Merge local PDFs:
pdf2pdf --output result.pdf first.pdf second.pdf
-
Merge local PDFs:
Output
Results go to standard output by default. Binary output requires a file, pipe, or redirection; only pdf2text writes directly to a terminal. Some converters produce ZIP archives containing their results. Diagnostics use standard error.
--output, -o FILE
Save the result to FILE. Use - for standard output.
An existing output file is replaced only after a successful conversion.
To send binary results to standard output, redirect them to a file or pipe them to another program.
- Default:
standard output- Example:
-
-
pdf2pdf --output FILE SOURCE
-
--print-debug-log-url
Print debug log url to stderr after conversion.
--print-remaining-credit-count
Print remaining credit count to stderr after conversion.
--print-consumed-credit-count
Print consumed credit count to stderr after conversion.
--print-job-id
Print job id to stderr after conversion.
--print-page-count
Print page count to stderr after conversion.
--print-output-size
Print output size to stderr after conversion.
--print-version
Print the converter version to stderr after conversion.
Configuration
If the default configuration file exists, conversions read it automatically. Conversions never save settings automatically. Run pdf2pdf help configuration to see the default file path. --config and --no-config are mutually exclusive.
Use a UTF-8 INI file with option-name = value lines and no
[section] headings. Use the option names with hyphens and without
leading dashes, for example debug-log instead of
--debug-log. Lines starting with # or ;
are comments.
Inline values can span multiple lines when each continuation line is indented more than the setting name. A blank line ends the value. Use a separate file for content that needs blank lines or exact formatting.
--config PATH
Read conversion defaults from PATH instead of the default file.
Command-line options override the settings in this file. This option applies to conversion settings; credentials are stored separately.
- Examples:
-
-
pdf2pdf --config PATH --output FILE SOURCE -
pdf2pdf --config ./defaults.ini -o result SOURCE
-
--no-config
Ignore saved conversion defaults for this command.
Command-line conversion options still apply. Saved credentials and environment variables still apply. The config file is left unchanged.
- Example:
-
-
pdf2pdf --no-config --output FILE SOURCE
-
--init-config
Create a commented config file that you can edit.
Open the created file and remove the leading # from settings you want to use. Future conversions read the default file automatically.
Use --config PATH to create a file at another location. An existing file is left unchanged. This command does not perform a conversion.
- Examples:
-
-
pdf2pdf --init-config [--config PATH] -
pdf2pdf --init-config -
pdf2pdf --init-config --config ./defaults.ini
-
--show-config
Show saved defaults and command-line overrides without converting.
Each setting shows whether it came from the config file or the command line. Other options use their API defaults.
Sensitive values and inline HTML, CSS, and JavaScript are hidden. No files are changed.
- Examples:
-
-
pdf2pdf --show-config [options] -
pdf2pdf --show-config -
pdf2pdf --no-config --show-config
-
Authentication
For account setup and credential selection, see Authentication.
auth ACTION
Manage credentials shared by all converter commands.
ACTION: Choose login, status, or logout.
- Usage:
-
pdf2pdf auth ACTION
pdfcrowd auth ACTION
auth login [--non-interactive]
Save your PDFCrowd username and API key for all converter commands.
Use both credential environment variables when set; otherwise prompt in an interactive terminal. The API-key prompt hides your input.
In a script, use --non-interactive to require environment credentials without prompting. This saves the account; it does not perform a conversion.
- Usage:
-
pdf2pdf auth login [--non-interactive]
pdfcrowd auth login [--non-interactive]
auth login --non-interactive
This option applies only to auth login.
Require environment credentials when saving an account with auth login; never prompt.
Set both PDFCROWD_USERNAME and PDFCROWD_API_KEY before running this command. The account is saved for all converters. Missing credentials cause an error.
- Example:
-
-
pdf2pdf auth login --non-interactive
-
auth status
Show which credentials will be used without revealing the API key.
This reads local settings; it does not verify the account with PDFCrowd.
- Usage:
-
pdf2pdf auth status
pdfcrowd auth status
auth logout
Remove the saved account for all converter commands.
Credential environment variables still apply when set.
- Usage:
-
pdf2pdf auth logout
pdfcrowd auth logout
Help and Version
help [TOPIC|OPTION|CATEGORY]
Show offline help for this converter.
Help does not load saved settings or credentials and does not contact the service.
TOPIC|OPTION|CATEGORY: Omit the argument for an overview. Supply one topic, option name (with or without --), or conversion category ID.
all: List every option.categories: List help topics and conversion option groups.syntax: Explain how to supply arguments.configuration: Save and load conversion defaults.authentication: Set up your PDFCrowd account.input-output: Read inputs and save results.exit-codes: Check whether a command succeeded.
- Usage:
-
pdf2pdf help [TOPIC|OPTION|CATEGORY]
pdfcrowd help pdf2pdf [TOPIC|OPTION|CATEGORY] - Examples:
-
-
pdf2pdf help all -
pdf2pdf help categories -
pdf2pdf help --output
-
help --json
This option applies only to help.
Print help as JSON for scripts, integrations, and AI agents.
Includes option names, argument types, defaults, allowed values, authentication rules, and exit codes. Works offline.
- Example:
-
-
pdf2pdf help --json
-
--help, -h
Show a summary of commands and options.
Use help all for every option, or help OPTION for details.
- Example:
-
-
pdf2pdf --help
-
--version, -V
Show the PDFCrowd CLI version.
- Example:
-
-
pdf2pdf --version
-
PDF Manipulation
--action
Specify the PDF manipulation operation to perform on input files.
- Syntax:
--action ACTION- Default:
join- Allowed Values:
-
-
join— Merge multiple input PDFs into a single document in the order they were added. -
shuffle— Interleave pages from input PDFs into a single document, taking one page at a time from each PDF in rotation. -
extract— Create a new PDF containing only the specified pages from the input PDF. -
delete— Remove the specified pages from the input PDF and output the remaining pages.
-
--input-pdf-password
Password for decrypting encrypted input PDFs.
- Availability:
- Converter >= 20.10. See versioning.
- Syntax:
--input-pdf-password PASSWORD
--page-range
Specify which pages to target. Supports individual pages, ranges, open-ended ranges, and combinations. The keyword "last" can be used to reference the final page.
- Syntax:
--page-range PAGES- Constraint:
-
- A comma separated list of page numbers or ranges.
- Examples:
-
-
Just the second page is selected:
"2" -
The first and the third page are selected:
"1,3" -
Everything except the first page is selected:
"2-" -
Just the first 3 pages are selected:
"-3" -
Pages 3, 6, 7, 8 and 9 are selected:
"3,6-9"
-
Just the second page is selected:
Watermark & Background
--page-watermark
Apply the first page of a watermark PDF to every page of the output PDF. Use this to add transparent overlays like "DRAFT" stamps, security markings, or branding elements that appear on top of content. Use this to mark confidential documents.
- Syntax:
--page-watermark WATERMARK- Constraint:
-
- The file must exist and not be empty.
- Examples:
-
-
Multi-page PDF for watermarking:
"/home/user/john/watermark.pdf" -
Transparent PNG overlay:
"/home/user/john/watermark.png"
-
Multi-page PDF for watermarking:
--page-watermark-url
Load a file from the specified URL and apply the file as a watermark to each page of the output PDF. A watermark can be either a PDF or an image. If a multi-page file (PDF or TIFF) is used, the first page is used as the watermark.
- Syntax:
--page-watermark-url URL- Constraint:
-
- Supported protocols are http:// and https://.
- Examples:
-
-
Download watermark from server:
"http://myserver.com/watermark.pdf" -
Remote logo watermark:
"http://myserver.com/watermark.png"
-
Download watermark from server:
--multipage-watermark
Apply each page of a watermark PDF to the corresponding page of the output PDF. Use this for page-specific watermarks where different pages need different overlays - for example, different approval stamps per department.
If the watermark has fewer pages than the output, the last watermark page is repeated for remaining pages.
- Syntax:
--multipage-watermark WATERMARK- Constraint:
-
- The file must exist and not be empty.
- Examples:
-
-
Multi-page PDF for watermarking:
"/home/user/john/watermark.pdf" -
Transparent PNG overlay:
"/home/user/john/watermark.png"
-
Multi-page PDF for watermarking:
--multipage-watermark-url
Load a file from the specified URL and apply each page of the file as a watermark to the corresponding page of the output PDF. A watermark can be either a PDF or an image.
- Syntax:
--multipage-watermark-url URL- Constraint:
-
- Supported protocols are http:// and https://.
- Examples:
-
-
Download watermark from server:
"http://myserver.com/watermark.pdf" -
Remote logo watermark:
"http://myserver.com/watermark.png"
-
Download watermark from server:
--page-background
Apply the first page of a background PDF to every page of the output PDF. Use this to add letterheads, branded templates, or decorative backgrounds that appear behind your content. Backgrounds appear beneath content, while watermarks layer on top.
- Syntax:
--page-background BACKGROUND- Constraint:
-
- The file must exist and not be empty.
- Examples:
-
-
PDF template background:
"/home/user/john/background.pdf" -
Image texture background:
"/home/user/john/background.png"
-
PDF template background:
--page-background-url
Load a file from the specified URL and apply the file as a background to each page of the output PDF. A background can be either a PDF or an image. If a multi-page file (PDF or TIFF) is used, the first page is used as the background.
- Syntax:
--page-background-url URL- Constraint:
-
- Supported protocols are http:// and https://.
- Examples:
-
-
Download template background:
"http://myserver.com/background.pdf" -
Remote background pattern:
"http://myserver.com/background.png"
-
Download template background:
--multipage-background
Apply each page of a background PDF to the corresponding page of the output PDF. Use this for page-specific backgrounds where each page needs a different template - for example, different letterheads for front and back pages.
If the background has fewer pages than the output, the last background page is repeated for remaining pages.
- Syntax:
--multipage-background BACKGROUND- Constraint:
-
- The file must exist and not be empty.
- Examples:
-
-
PDF template background:
"/home/user/john/background.pdf" -
Image texture background:
"/home/user/john/background.png"
-
PDF template background:
--multipage-background-url
Load a file from the specified URL and apply each page of the file as a background to the corresponding page of the output PDF. A background can be either a PDF or an image.
- Syntax:
--multipage-background-url URL- Constraint:
-
- Supported protocols are http:// and https://.
- Examples:
-
-
Download template background:
"http://myserver.com/background.pdf" -
Remote background pattern:
"http://myserver.com/background.png"
-
Download template background:
PDF Format
--linearize
Create linearized PDF. This is also known as Fast Web View. Use this to optimize PDFs for progressive download, allowing users to start viewing the first page while the rest downloads.
- Syntax:
--linearize[=true|false]- Default:
false- Allowed Values:
-
-
true -
false
-
--encrypt
Encrypt the PDF to prevent search engines from indexing the contents and add an extra layer of security. Use this for confidential documents, internal reports, or any content you do not want appearing in search results.
Combine with a password to require authentication for viewing, or just use encryption alone to prevent indexing while keeping the PDF publicly readable.
- Syntax:
--encrypt[=true|false]- Default:
false- Allowed Values:
-
-
true -
false
-
--user-password
Protect the PDF with a user password to restrict who can open and view the document. Recipients must enter this password to view the PDF. Use this for confidential documents, sensitive data, or content distribution where you want to control access.
Combine with permission flags to restrict what users can do after opening.
- Syntax:
--user-password PASSWORD- Example:
-
-
Simple document password:
"123456"
-
Simple document password:
--owner-password
Protect the PDF with an owner password for administrative control. This password allows changing permissions, passwords, and document restrictions - like a master key. Use different user and owner passwords to give recipients restricted access while retaining full control.
The owner password should be kept confidential and different from the user password.
- Syntax:
--owner-password PASSWORD- Example:
-
-
Admin access password:
"123456"
-
Admin access password:
--no-print
Disallow printing of the output PDF to protect sensitive content. Use this for confidential documents, copyrighted materials, or preview versions you want to restrict.
- Syntax:
--no-print[=true|false]- Default:
false- Allowed Values:
-
-
true -
false
-
--no-modify
Disallow modification of the output PDF to maintain document integrity. Use this for official documents, contracts, or records that should not be altered after creation. Prevents recipients from editing content, adding annotations, or extracting pages.
- Syntax:
--no-modify[=true|false]- Default:
false- Allowed Values:
-
-
true -
false
-
--no-copy
Disallow text and graphics extraction from the output PDF to protect copyrighted content. Use this for ebooks, proprietary documents, or materials where you want to prevent easy copying and redistribution.
- Syntax:
--no-copy[=true|false]- Default:
false- Allowed Values:
-
-
true -
false
-
--title
Set the title of the PDF that appears in PDF reader title bars and document properties. Use descriptive titles for better organization and searchability in document management systems.
This metadata helps users identify documents when multiple PDFs are open and improves accessibility for screen readers.
- Syntax:
--title TITLE- Example:
-
-
Personal CV title:
"My Resume"
-
Personal CV title:
--subject
Set the subject of the PDF to categorize or summarize the document content. Use this to add searchable metadata for document management systems, improve organization in large PDF libraries, or provide context about the document's purpose.
Appears in PDF properties dialog.
- Syntax:
--subject SUBJECT- Example:
-
-
Technical position subject:
"CV - Software Developer"
-
Technical position subject:
--keywords
Associate keywords with the document to improve searchability in document management systems. Use relevant terms that describe the content, making it easier to find documents later.
Separate multiple keywords with commas. Particularly useful for large document repositories or DAM systems.
- Syntax:
--keywords KEYWORDS- Example:
-
-
Technical skills for searchability:
"software developer, Unix, databases"
-
Technical skills for searchability:
--use-metadata-from
Use metadata (title, subject, author and keywords) from the n-th input PDF when merging multiple PDFs. Set to 1 to use the first PDF's metadata, 2 for the second, etc. Use this when combining PDFs and you want to preserve the metadata from a specific document rather than starting with blank metadata.
Set to 0 for no metadata.
- Syntax:
--use-metadata-from INDEX- Constraint:
-
- Must be a positive integer or 0.
- Example:
-
-
Use metadata from the first input PDF:
1
-
Use metadata from the first input PDF:
--attachment
Embed a file as an attachment in the output PDF. Call this method repeatedly to attach several files.
- Availability:
- Converter >= 24.04. See versioning.
- Syntax:
--attachment ATTACHMENT- Repeated values:
- Repeat this option to supply more than one value.
- Constraint:
-
- The file must exist and not be empty.
Viewer Preferences
--page-layout
Control how pages appear when the PDF opens in viewers that respect these preferences. "single-page" for focused reading one page at a time. "one-column" for continuous scrolling like a web page. "two-column-left" for book-like layouts with odd pages on left (international standard). "two-column-right" for magazines with odd pages on right.
- Syntax:
--page-layout LAYOUT- Allowed Values:
-
-
single-page— Display one page at a time. -
one-column— Display the pages in one column. -
two-column-left— Display the pages in two columns, with odd-numbered pages on the left. -
two-column-right— Display the pages in two columns, with odd-numbered pages on the right.
-
--page-mode
Control the initial display mode when the PDF opens. "full-screen" for presentations and kiosk displays where you want an immersive experience. "thumbnails" for long documents where visual page navigation is helpful. "outlines" for structured documents with bookmarks/table of contents.
- Syntax:
--page-mode MODE- Allowed Values:
-
-
full-screen— Full-screen mode. -
thumbnails— Thumbnail images are visible. -
outlines— Document outline is visible.
-
--initial-zoom-type
Control how the PDF is initially zoomed when opened.
- Syntax:
--initial-zoom-type ZOOM_TYPE- Allowed Values:
-
-
fit-width— The page content is magnified just enough to fit the entire width of the page within the window. -
fit-height— The page content is magnified just enough to fit the entire height of the page within the window. -
fit-page— The page content is magnified just enough to fit the entire page within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the page within the window in the other dimension.
-
--initial-page
Display the specified page when the document is opened.
- Syntax:
--initial-page PAGE- Constraint:
-
- Must be a positive integer.
- Example:
-
-
Start at second page:
2
-
Start at second page:
--initial-zoom
Specify the initial page zoom in percents when the document is opened.
- Syntax:
--initial-zoom ZOOM- Constraint:
-
- Must be a positive integer.
- Example:
-
-
Half-size zoom level:
50
-
Half-size zoom level:
--hide-toolbar
Hide the viewer's toolbar when the PDF is opened to provide a cleaner, more focused reading experience. Use this for presentations, kiosk displays, or immersive reading where you want minimal UI distractions.
- Syntax:
--hide-toolbar[=true|false]- Default:
false- Allowed Values:
-
-
true -
false
-
--hide-window-ui
Hide user interface elements like scroll bars and navigation controls when the PDF opens. Use this for presentation mode, digital signage, or embedded PDFs where you want the most minimal interface possible.
Combines with other UI hiding options for full-screen immersive viewing.
- Syntax:
--hide-window-ui[=true|false]- Default:
false- Allowed Values:
-
-
true -
false
-
--fit-window
Resize the PDF viewer window to fit the size of the first displayed page when opened. Use this to ensure the PDF opens at an appropriate size rather than filling the entire screen.
Particularly useful for small documents, forms, or certificates that look better at actual size.
- Syntax:
--fit-window[=true|false]- Default:
false- Allowed Values:
-
-
true -
false
-
--center-window
Position the PDF viewer window in the center of the screen when opened.
- Syntax:
--center-window[=true|false]- Default:
false- Allowed Values:
-
-
true -
false
-
--display-title
Display the title of the HTML document in the PDF viewer's title bar instead of the filename. Use this to show more descriptive titles when PDFs are opened - particularly useful when the filename is cryptic or auto-generated.
Improves user experience by showing meaningful document names.
- Syntax:
--display-title[=true|false]- Default:
false- Allowed Values:
-
-
true -
false
-
--right-to-left
Set the predominant reading order for text to right-to-left. This option has no direct effect on the document's contents or page numbering but can be used to determine the relative positioning of pages when displayed side by side or printed n-up.
- Syntax:
--right-to-left[=true|false]- Default:
false- Allowed Values:
-
-
true -
false
-
Miscellaneous
--debug-log
Turn on debug logging to troubleshoot conversion issues. Details about the conversion process, including resource loading, rendering steps, and error messages are stored in the debug log. Use this when conversions fail or produce unexpected results.
- Syntax:
--debug-log[=true|false]- Default:
false- Allowed Values:
-
-
true -
false
-
--tag
Tag the conversion with a custom value for tracking and analytics. Use this to categorize conversions by customer ID, document type, or business unit. The tag appears in conversion statistics. A value longer than 32 characters is cut off.
- Syntax:
--tag TAG- Example:
-
-
Track job in analytics:
"client-1234"
-
Track job in analytics:
API Client Options
--converter-version
Set the converter version. Different versions may produce different output. Choose which one provides the best output for your case.
- Syntax:
--converter-version VERSION- Default:
24.04- Allowed Values:
-
-
24.04— Version 24.04. -
20.10— Version 20.10. -
18.10— Version 18.10.
-
--use-http
Specify whether to use HTTP or HTTPS when connecting to the PDFCrowd API.
- Syntax:
--use-http[=true|false]- Default:
false- Allowed Values:
-
-
true -
false
-
--client-user-agent
Specify the User-Agent HTTP header the CLI sends to the PDFCrowd API.
- Syntax:
--client-user-agent AGENT- Default:
pdfcrowd_cli_client/1.1.0 (https://pdfcrowd.com)
--proxy
Specify an HTTP proxy the CLI uses to connect to the PDFCrowd API.
- Syntax:
--proxy HOST PORT USER_NAME PASSWORD
--retry-count
Specify the number of automatic retries when a 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
- Syntax:
--retry-count COUNT- Default:
1- Example:
-
-
Retry failed requests three times:
3
-
Retry failed requests three times: