Conversion Input
url
The address of the image 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:
-
-
image— Image format is recognized automatically.
-
output_format
The output file format.
- Default:
png- Allowed Values:
-
-
png -
jpg -
gif -
tiff -
bmp -
ico -
ppm -
pgm -
pbm -
pnm -
psb -
pct -
ras -
tga -
sgi -
sun -
webp
-
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.
-
Image Operations
Settings used for operations with images.
resize
Scale the image to different dimensions. Accepts percentage values for proportional scaling or explicit pixel dimensions for absolute sizing.
- Default:
100%- Examples:
-
-
Enlarge for high-res display:
200% -
Standard XGA screen resolution:
1024x768
-
Enlarge for high-res display:
rotate
Rotate the image by the specified angle in degrees. Positive values rotate clockwise, negative values counterclockwise.
crop_area_x
Set the horizontal starting position of the crop area, measured from the left edge of the print area. Positive values offset inward from the left edge, negative values extend beyond the left boundary.
- Constraint:
-
- The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
- Default:
0px- Examples:
-
-
Crop extends beyond left edge:
-1in -
Skip narrow border area:
10mm
-
Crop extends beyond left edge:
crop_area_y
Set the vertical starting position of the crop area, measured from the top edge of the print area. Positive values offset inward from the top edge, negative values extend beyond the top boundary.
- Constraint:
-
- The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
- Default:
0px- Examples:
-
-
Crop extends beyond top edge:
-1in -
Skip narrow border area:
10mm
-
Crop extends beyond top edge:
crop_area_width
Set the horizontal extent of the crop area. Defines the width of the region to be converted. Minimum value is 1 inch.
- Constraint:
-
- The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
- Default:
The width of the print area.- Examples:
-
-
Standard document crop width:
8in -
Full A4 page width crop:
210mm
-
Standard document crop width:
crop_area_height
Set the vertical extent of the crop area. Defines the height of the region to be converted. Minimum value is 1 inch.
- Constraint:
-
- The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
- Default:
The height of the print area.- Examples:
-
-
Standard US Letter crop height:
11in -
Full A4 page height crop:
297mm
-
Standard US Letter crop height:
remove_borders
Detect and remove solid-color borders surrounding the image content. Only removes borders that consist of a single consistent color.
- Default:
false- Allowed Values:
-
-
true, 1 or on -
false, 0 or off
-
Canvas Setup
canvas_size
Set the output canvas size. Use standard sizes (A4, Letter, A3, etc.) for printable output with consistent dimensions.
- Allowed Values:
-
-
A0 -
A1 -
A2 -
A3 -
A4 -
A5 -
A6 -
Letter
-
canvas_width
Set the output canvas width.
- Constraint:
-
- The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
- Examples:
-
-
A4 landscape / banner width:
297mm -
US Letter standard width:
8.5in
-
A4 landscape / banner width:
canvas_height
Set the output canvas height.
- Constraint:
-
- The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
- Examples:
-
-
Large poster canvas height:
420mm -
US Letter standard height:
11in
-
Large poster canvas height:
orientation
Set the output canvas orientation. Use portrait for vertical content, landscape for horizontal or wide content.
- Default:
portrait- Allowed Values:
-
-
landscape -
portrait
-
position
Set the image position on the canvas. Center for balanced composition, or corner/edge positions for specific layouts.
- Default:
center- Allowed Values:
-
-
center -
top -
bottom -
left -
right -
top-left -
top-right -
bottom-left -
bottom-right
-
print_canvas_mode
Set the mode to print the image on the canvas.
- Default:
default- Allowed Values:
-
-
default— No image scaling. -
fit— Fit the image to the canvas with aspect ratio. -
stretch— Stretch the image to the canvas with no aspect ratio.
-
margin_top
Set the output canvas top margin.
- Constraint:
-
- The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
- Examples:
-
-
Wide margin for framing:
1in -
Minimal margin for web images:
10mm
-
Wide margin for framing:
margin_right
Set the output canvas right margin.
- Constraint:
-
- The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
- Examples:
-
-
Wide margin for framing:
1in -
Minimal margin for web images:
10mm
-
Wide margin for framing:
margin_bottom
Set the output canvas bottom margin.
- Constraint:
-
- The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
- Examples:
-
-
Wide margin for framing:
1in -
Minimal margin for web images:
10mm
-
Wide margin for framing:
margin_left
Set the output canvas left margin.
- Constraint:
-
- The value must be specified in inches 'in', millimeters 'mm', centimeters 'cm', pixels 'px', or points 'pt'.
- Examples:
-
-
Wide margin for framing:
1in -
Minimal margin for web images:
10mm
-
Wide margin for framing:
canvas_background_color
The canvas background color in RGB or RGBA hexadecimal format. The color fills the entire canvas regardless of margins. If no canvas size is specified and the image format supports background (e.g. PDF, PNG), the background color is applied too.
- Constraint:
-
- The value must be in RRGGBB or RRGGBBAA hexadecimal format.
- Examples:
-
-
red color:
FF0000 -
green color:
00ff00 -
green color with 50% opacity:
00ff0080
-
red color:
dpi
Set the DPI resolution of the input image. The DPI affects margin options specified in points too (e.g. 1 point is equal to 1 pixel in 96 DPI).
- Default:
96- Example:
-
-
The DPI used for printers. 1 inch contains 300 points:
300
-
The DPI used for printers. 1 inch contains 300 points:
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: