V1 Document Transformation

In order to convert office documents with the v1 style urls take the Filestack file url and append /convert, along with the appropriate query parameter for the document type.

Format: This is the primary parameter for document conversions. Format names are all lower case.

Document conversion urls follow this structure: https://www.filestackapi.com/api/file/c3uwTLVOSxuAyfZ5QWk3/convert?format=xxxxx

PDF to image conversions only convert one page at a time. You can work with each page by adding in the "page" parameter. https://www.filestackapi.com/api/file/dQogyFzRzOe6YCV8WWaL/convert?format=jpg&page=4.

In order to get the number of pages in a document, you can add the parameter getpdfinfo like this: https://www.filestackapi.com/api/file/dQogyFzRzOe6YCV8WWaL/convert?getpdfinfo=true to get the number of pages in the PDF. This will also work for non-PDF files, such as powerpoint presentations.The data you receive back from the getpdfinfo parameter will look like this: {"numpages":28,"dimensions":{"width":794,"height":595}}.

When converting PDF and PowerPoint documents to images, you can improve/adjust the resolution of the file that it generates by using the density parameter like this: https://www.filestackapi.com/api/file/dQogyFzRzOe6YCV8WWaL/convert?format=jpg&density=200. The maximum value you can set the density variable to is 500.

Syntax

https://www.filestackapi.com/api/file/<handle>/convert?[options]

List of Possible 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