Skip to main content

Transforming Files

Files.com can convert files from one file type to another, or transform a file's contents by running a TransformScript against it. Use the Transform action from the File Manager or from Preview to transform files as needed. You choose where to save the resulting file. File transformations can also be triggered programmatically through the API, an SDK, or the AI Assistant.

Transform a file when you have it in one format and need it in another, such as converting a spreadsheet a partner sent as .xls into .csv for a downstream system, turning a PDF into an editable .docx, converting and resizing an image, or running a TransformScript to reshape a file's contents on the way to a new format.

The receiving system's data specification determines more than the output extension. Encoding, record structure, and the meaning of identifiers, dates, and amounts must also match. Use Document Conversion for a change of document format and TransformScript for explicit field mapping and value conversion.

How Transformations Work

When you transform a file, you select an input file and choose where to write the new file. For Document Conversion and Image Conversion, you also choose the output format; for TransformScript, the script itself determines it.

Transforming a file creates a new file and leaves the original unchanged. If a file already exists at the chosen destination, the Overwrite existing file option allows the new file to replace it only when your folder permissions permit that replacement. With the option turned off, the new file won't overwrite a file that already exists.

Document conversion transformations let you convert standard business file format documents into other types of documents.

Image conversion transformations allow you to convert between image types and also change the dimensions of the output file.

TransformScript transformations are for changing structured file data. Using TransformScript allows you to filter data, re-arrange fields, calculate and add new data to the output file during the transformation.

Document Conversion

You can convert documents, spreadsheets, and presentations between formats. The file's extension determines which output formats are available.

The output format determines which document features can be retained. Conversion can change formatting or layout, and spreadsheet conversion can interpret text values as numbers or dates. Check the converted file's values and formatting in the receiving application before using it in a downstream workflow.

Spreadsheet file types can be converted either with a standard Document Conversion, allowing you to create csv or pdf or xlsx output files, or with TransformScript, which supports csv, edifact, hl7, json, ndjson, urlencoded, x12, xlsx, xml, or yaml output.

File TypeInput FormatsOutput Formats
Documentpdf, doc, dot, docx, docm, dotx, dotm, wps, rtf, djvu, docxf, fb2, fodt, odt, ott, oxps, stw, sxw, wpt, mddocx, pdf, rtf, txt
Spreadsheetxls, xlt, xlsx, xlsm, xltx, xltm, xlsb, et, ett, fods, ods, ots, sxc, csv, tsvcsv, pdf, xlsx
Presentationppt, pps, pot, pptx, pptm, potx, potm, dps, dpt, fodp, odp, otp, ppsm, ppsx, sxipdf, pptx

Image Conversion

You can convert an image from any of the input formats below to any of the output formats, and resize it at the same time.

File TypeInput FormatsOutput Formats
Image4fr, arw, cgm, cr2, crw, dcr, gif, heic, heif, ico, icon, jpeg, jpg, k25, kdc, mrw, nef, png, psd, rw2, sf2, sr2, srf, svg, tga, tif, tiff, wbpm, webp, xcfjpg, jpeg, png, webp, gif, tif, tiff

Resizing While Converting

You can optionally resize the image as part of the conversion by supplying a width, a height, or both, in pixels.

When you supply only one dimension, Files.com preserves the aspect ratio. When you supply both, the image fits within that box while preserving the aspect ratio.

TransformScript

Instead of converting a file to a fixed output format, you can provide a TransformScript to reshape the file's contents. The output extension is determined by your script, and the destination filename extension must match what the script produces.

File TypeInput FormatsOutput Formats
TransformScriptcsv, edifact, hl7, json, ndjson, urlencoded, x12, xlsx, xml, yaml, yml, plus spreadsheet formats that convert on input: xls, xlt, xlsm, xltx, xltm, xlsb, et, ett, fods, ods, ots, sxc, tsvcsv, edifact, hl7, json, ndjson, urlencoded, x12, xlsx, xml, yaml

These are the input extensions accepted by the Transform File action. For newline-delimited JSON, use .ndjson with this action. Automations and Content Validation also recognize .jsonl.

Files in the spreadsheet formats marked for input conversion are converted to CSV before the script runs. If you declare input or its properties for one of these files, use input csv for the converted data. XLSX is read directly with its worksheet and header settings.

Permissions Required

Transforming a file requires read permission on the input file and write permission on the destination folder.

Background Execution

Transformations run as asynchronous (backgrounded) operations. The new file does not appear at the destination until the transformation completes, and it is added atomically.

In the web interface, Files.com shows in-progress work under Actions In Progress.