Translate PDF Guide

Learn to develop your own PDF translation software to automatically translate PDF files.

Remember that in order to use our Tool Guides, you need to have previous knowledge about the basics to processing a PDF with our REST API. We strongly recommend that you read the Processing a PDF guide before starting this one.

Basic translate

The following example will show you how to translate the text content of a PDF document while preserving its original layout and formatting. Keep in mind that the translated document will retain the existing structure, styles, and embedded elements by default.

You can translate PDF files very easily using the Translate PDF tool, as shown in this code:

Basic translate

You can add as many files as you want to translate. To process your files, simply choose the Translate PDF tool.

Advanced translate

You can configure the input language, output language, and the desired output format for the translated document.

By default, the output format is set to pdf, which tries to keep the same format as the original document.

Simply set the properties language_input, language_output, and output_format with your desired values like this:

Advanced translate

These are the available output formats:

  • pdf translates the document and tries to keep the same format as the original PDF.
  • txt extracts the translated content as plain text.

You can also define the source and target languages using their language codes.

For example:

  • eng for English.
  • spa for Spanish.
  • fra for French.
  • deu for German.
  • ita for Italian.
  • por for Portuguese.

The REST API translates your documents according to the selected input and output languages, returning the translated file in the chosen output format.