Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

IPDFOutput::setPreset

IPDFOutput supports several presets that control how the PDF is written. Presets apply a number of parameters (see Output parameters (PDF)) in one operation.

Code Block
languagecpp
titlesetPreset
IPDFOutputPtr output = IPDFOutput::create(jawsMako);
output->setPreset("Preserve");

makoconverter allows you to experiment with these presets by adding them to the command line, for example:

Code Block
languagepowershell
titleUsing presets in makoconverter
makoconverter MyInput.pdf MyOutput.pdf preset=PDF/X-4

The following presets are supported.

Preserve

Attempts to produce output as close as possible to the format of the input.

PDF1.3

Configures the output for PDF 1.3. In addition to setting the output version, this will also cause all objects to be colour converted to DeviceRGB, but this may be overridden with setTargetSpace().

General

A general purpose PDF output for general document exchange and viewing. PDF 1.7, RGB

Print

A higher quality/larger file size for print purposes. Uses PDF 1.4 for wide support.

Web

A general purpose PDF output for distributing documents online. PDF 1.7, RGB.

PDF/A-1b

A preset for generating PDF/A-1b, RGB, with sensible defaults for resolution and downsampling

PDF/A-2b**A preset for generating PDF/A-2b, RGB, with sensible defaults for resolution and downsampling. It extends the capabilities of PDF/A-1 and is based on PDF version 1.7.
PDF/X-1aA preset for generating PDF/X-1a, CMYK (SWOP) with everything converted to CMYK.
PDF/X-4A preset for generating PDF/X-4, CMYK (SWOP) with sensible defaults. PDF/X-4 allows for complete exchange for both color-managed and CMYK workflows and is based on PDF version 1.6. Permits transparency.

  ** New in Mako 4.8.0

PDF Linearization

When outputting to PDF, the Mako SDK has an option to linearize the output. This is useful in scenarios where the output document may be streamed or downloaded from the web.

Linearizing can be slower to output. When linearization is set, a PDF cannot be written incrementally.

Enabling linearized output is as simple as creating your IPDFOutput instance and calling setLinearize(...).

Code Block
languagecpp
pdfOutput->setLinearize(true);