Conversion Input
url
The address of the PDF to convert.
- Constraint:
-
- Supported protocols are http:// and https://.
file
The path to a local file to convert.
- Constraint:
-
- The file must exist and not be empty.
data
Convert raw binary data to the desired output format.
Use this for processing binary content, handling file uploads as byte arrays, or when working with data from external APIs. Provides maximum flexibility for binary data conversions.
Conversion Format
input_format
The format of the input file. Specify the source format to ensure correct processing (HTML, PDF, image, etc.).
- Allowed Values:
-
-
pdf
-
output_format
The output file format.
- Default:
html- Allowed Values:
-
-
html
-
Response
output_name
The file name of the created file (max 180 chars). If not specified, the name is auto-generated.
content_disposition
The value of the Content-Disposition HTTP header sent in the response.
- Default:
attachment- Allowed Values:
-
-
attachment— Forces the browser to pop up a Save As dialog. -
inline— The browser will open the result file in the browser window.
-
General Options
pdf_password
Password to open the encrypted PDF file.
scale_factor
Set the scaling factor (zoom) for the main page area.
- Constraint:
-
- Must be a positive integer.
- Default:
100
print_page_range
Set the page range to print.
- Constraint:
-
- A comma separated list of page numbers or ranges.
- Examples:
-
-
Just the second page is printed:
2 -
The first and the third page are printed:
1,3 -
Everything except the first page is printed:
2- -
Just first 3 pages are printed:
-3 -
Pages 3, 6, 7, 8 and 9 are printed:
3,6-9
-
Just the second page is printed:
dpi
Set the output graphics DPI. Higher values (144-300) improve quality but increase file size. Use 144 for web, 300 for print.
- Availability:
- Available for converters >= 20.10. See versioning.
- Default:
144
image_mode
Specify where the images are stored. Use separate files for better performance with large images or when serving images from a CDN. Use embedded for single-file portability.
- Default:
embed- Allowed Values:
-
-
embed— The images are embedded into the output HTML file. -
separate— The images are saved to separate files. In this mode the output of the conversion is a zip file containing the HTML and all image files. -
none— The images are ignored and not converted.
-
image_format
Specify the format for the output images. Use PNG for lossless quality, JPG for smaller file sizes, or SVG for vector graphics.
- Availability:
- Available for converters >= 20.10. See versioning.
- Default:
png- Allowed Values:
-
-
png -
jpg -
svg
-
css_mode
Specify where the style sheets are stored. Use separate files for better browser caching and easier debugging. Use embedded for single-file HTML output.
- Default:
embed- Allowed Values:
-
-
embed— Style sheets are embedded into the output HTML file. -
separate— Style sheets are saved to separate files. In this mode the output of the conversion is a zip file containing the HTML and all style sheets.
-
font_mode
Specify where the fonts are stored. Use separate files for better browser caching and to reduce HTML file size. Use embedded for single-file portability.
- Default:
embed- Allowed Values:
-
-
embed— The fonts are embedded into the output HTML file. -
separate— The font are saved to separate files. In this mode the output of the conversion is a zip file containing HTML and all font files.
-
type3_mode
Set the processing mode for handling Type 3 fonts.
- Availability:
- Available for converters >= 24.04. See versioning.
- Default:
raster- Allowed Values:
-
-
raster— Rasters Type 3 fonts into images, ensuring an exact visual representation in the HTML output. -
convert— Attempts to convert Type 3 fonts to a web font, resulting in smaller file sizes with some possible visual discrepancies.
-
split_ligatures
Converts ligatures, two or more letters combined into a single glyph, back into their individual ASCII characters.
- Default:
false- Allowed Values:
-
-
true, 1 or on -
false, 0 or off
-
custom_css
Apply custom CSS to the output HTML document to modify the visual appearance and layout. Use this to customize the styling of the converted HTML, adjust fonts, colors, spacing, or override default conversion styles.
Use !important in your CSS rules to prioritize and override conflicting styles.
- Availability:
- Available for converters >= 24.04. See versioning.
- Example:
-
-
Set the main background color to azure:
#page-container { background-color: azure; }
-
Set the main background color to azure:
html_namespace
Add the specified prefix to all id and class attributes in the HTML content, creating a namespace for safe integration into another HTML document. This ensures unique identifiers, preventing conflicts when merging with other HTML.
- Availability:
- Available for converters >= 24.04. See versioning.
- Constraint:
-
- Start with a letter or underscore, and use only letters, numbers, hyphens, underscores, or colons.
- Examples:
-
-
Namespace for first PDF embed:
pdf1_ -
Custom namespace to avoid conflicts:
uniqueID123_
-
Namespace for first PDF embed:
force_zip
Enforce the zip output format. Use when you want output as a zip archive even if single-file output would be possible.
- Default:
false- Allowed Values:
-
-
true, 1 or on -
false, 0 or off
-
title
Set the HTML title. The title from the input PDF is used by default.
subject
Set the HTML subject. The subject from the input PDF is used by default.
keywords
Associate keywords with the HTML document. Keywords from the input PDF are used by default.
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. The URL of the log is returned in the x-pdfcrowd-debug-log response header or available in conversion statistics.
- Default:
false- Allowed Values:
-
-
true, 1 or on -
false, 0 or off
-
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.
- Example:
-
-
Track job in analytics:
client-1234
-
Track job in analytics:
http_proxy
A proxy server used by the conversion process for accessing the source URLs with HTTP scheme. This can help circumvent regional restrictions or provide limited access to your intranet.
- Constraint:
-
- The value must have format DOMAIN_OR_IP_ADDRESS:PORT.
- Examples:
-
-
Corporate proxy server:
myproxy.com:8080 -
Direct IP proxy connection:
113.25.84.10:33333
-
Corporate proxy server:
https_proxy
A proxy server used by the conversion process for accessing the source URLs with HTTPS scheme. This can help circumvent regional restrictions or provide limited access to your intranet.
- Constraint:
-
- The value must have format DOMAIN_OR_IP_ADDRESS:PORT.
- Examples:
-
-
Secure proxy for HTTPS:
myproxy.com:443 -
Direct secure proxy IP:
113.25.84.10:44333
-
Secure proxy for HTTPS: