Filetype Conversions - Output Format Conversions and Quality Transformations

You can convert many document types to images and vice versa. The quality and compression of an image may also be manipulated.

Note: The maximum accepted image size is 100,000,000 pixels. An image with this many pixels could have width and height combinations like 10,000 x 10,000 or 5,000 x 20,000, etc. There is also a file size restriction. Filestack will not convert an image that is larger than 256mb. Please contact us if you require the ability to process larger files than our current limits.

Output

Output URL Format:
https://process.filestackapi.com/output=[options]/Filestack_FileLink_Handle
or
https://process.filestackapi.com/<API_KEY>/output=[options]/File_URL

output=format:{file type}
String

Can be abbreviated as f:png

The format to which you would like to convert the file.

For a complete list of possible conversions, see the table below.
output=background:white or FFFFFFFF
String

Can be abbreviated as b:ff0000

Set a background color when converting transparent .png files into other file types. The default background when converting a transparent png file is white. The background parameter allows you to control the background color of the returned file when used in the following way: output=format:jpg,background:red. The background value can be the name of a color or a hex color code. Click here for a list of accepted color names
output=page:1 to 10000
Integer

Can be abbreviated as p:4

If you are converting a file that contains multiple pages such as a PDF or powerpoint file, you can extract a specific page using the page parameter. The value for the page parameter must be an integer between 1 and 10000, the default is 1.
output=density:1 to 500
Integer

Can be abbreviated as d:50

You can adjust the density when converting documents like PowerPoint, PDF, AI and EPS files to image formats like JPG or PNG. This can improve the resolution of the output image. The value for the density parameter must be an integer between 1 and 500.
output=compress:true
Boolean

Can be abbreviated as c:true

You can take advantage of Filestack's image compression which utilizes JPEGtran and OptiPNG. The value for this parameter is boolean. If you want to compress your image then the value should be compress:true. Compression is off/false by default.
output=quality:1 to 100 or input
Integer or String

Can be abbreviated as q:80

You can change the quality (and reduce the file size) of JPEG images by using the quality parameter. The value for this parameter must be an integer between 1 and 100. The quality is set to 100 by default. A quality setting of 80 provides a nice balance between file size reduction and image quality. If the quality is instead set to "input" the image will not be recompressed and the input compression level of the jpg will be used.
output=strip:true
Boolean

Can be abbreviated as t:true

This parameter will remove any metadata embedded in an image.
no_metadata
String

The root task cannot be abbreviated

This alternative method for stripping metadata from an image is not part of the output task, and is a task all by itself. It will remove any metadata embedded in an image. The format of a url employing this method would be formatted like this: https://process.filestackapi.com/your_api_key/no_metadata/filestack_handle_or_external_url
output=colorspace:RGB, CMYK or Input
String

Can be abbreviated as o:input

By default we convert all the images to the RGB color model in order to be web friendly. However, we have added an option to preserve the original colorspace by appending output=colorspace:input, or switch the colorspace by using output=colorspace:RGB or output=colorspace:CMYK. This will work for JPEGs and TIFFs.
output=secure:true
Boolean

Can be abbreviated as s:true

This parameter applies to conversions of HTML and SVG sources. When the secure parameter is set to true, the HTML or SVG file will be stripped of any insecure tags (HTML sanitization). The default setting for the secure parameter is false.
output=docinfo:true
Boolean

Can be abbreviated as i:true

The docinfo parameter can be used to get information about a document, such as the number of pages and the dimensions of the file. This information is delivered as a JSON object that will look like this: {"numpages":41,"dimensions":{"width":538,"height":718}}. The value for this parameter is boolean and the default setting for the info parameter is false.
output=pageformat:letter
String

Can be abbreviated as a:legal

The pageformat parameter can be used to set the page size used for the layout of the resultant document. This parameter can be used when converting the format of one document into PDF, PNG, or JPG. Possible values are:

a3 A3 a4 A4 a5 A5 b4 B4 b5 B5 letter legal tabloid
output=pageorientation:portrait or landscape
String

Can be abbreviated as r:landscape

The pageorientation parameter can be used to determine the orientation of the resultant document. This parameter can be used when converting the format of one document into PDF, PNG, or JPG. Possible values are landscape and portrait.

List of Possible Format Conversions by Document Type
(i.e. PDFs can be converted to jpg, odp, ods, odt, png, and txt)

Original Format Possible File Type Conversions
PDF jpg, odp, ods, odt, png, svg, and txt
DOC docx, html, jpg, odt, pdf, png, svg, and txt
DOCX doc, html, jpg, odt, pdf, png, svg, and txt
ODT doc, docx, html, jpg, pdf, png, svg, and txt
XLS jpg, pdf, ods, png, svg, and xlsx
XLSX jpg, pdf, ods, png, svg, and xls
ODS jpg, pdf, png, xls, svg, and xlsx
PPT jpg, odp, pdf, png, svg, and pptx
PPTX jpg, odp, pdf, png, svg, and ppt
ODP jpg, pdf, png, ppt, svg, and pptx
BMP jpg, odp, ods, odt, pdf, png, and svg
GIF jpg, odp, ods, odt, pdf, png, and svg
JPG odp, ods, odt, pdf, png, and svg
PNG jpg, odp, ods, odt, pdf, and svg
TIFF jpg, odp, ods, odt, pdf, png, and svg
AI jpg, odp, ods, odt, pdf, png, and svg
PSD jpg, odp, ods, odt, pdf, png, and svg
SVG jpg, odp, ods, odt, pdf and png
HTML odt, pdf, svg, and txt
TXT html, odt, pdf, and svg

Output Examples

Original Image


Image converted from JPG to PNG format:png:

original image transformed from a jpg to a png

Image converted to a PDF format:PDF:


Image with quality parameter set to 50, quality:50:

image quality reduced by half to produce an image with a smaller size

PNG with a transparent background

original image with transparent background to be altered.

CC BY-SA 2.0, https://commons.wikimedia.org/w/index.php?curid=10842550


Image converted from PNG to JPG with black backgroundformat:jpg,background:black:

changing png to jpg and altering transparent background to be black

Converting a PowerPoint page to an image and adjusting density, format:jpg,density:200,page:4:

page in a powerpoint presentation transformed into a jpeg and density increased

Preserving the colorspace of the original image (CMYK) using colorspace:input:

preserving the original CMYK colorspace

CC BY-SA 3.0, https://en.wikipedia.org/w/index.php?curid=19698908


Changing the colorspace of the original image from CMYK to RGB using colorspace:RGB:

changing the original CMYK colorspace to RGB

Changing the page layout and orientation of a document using pageformat:a3,pageorientation:landscape:

Original Document Layout

original document converted to jpg with default layout

Document with converted pageformat and orientation:

original document converted to jpg with different page layout and orientation