Skip to main content
Skip table of contents

Output parameters (PDF)

The supported settings can be found under the headings listed on the right.

PDF Versions

Parameter

Possible values

Description

PDFVersion

1.3

1.4

1.5

1.6

1.7

2.0

Sets PDF version. The default is 1.7.

PDF/A-1b

PDF/A-2b

PDF/A-3b

PDF/A-2u

PDF/X-1a

PDF/X-4

For PDF/A, consider using a PDF/A preset.

The conformance level PDF/A-2u (“u” = “Unicode”) simplifies text searching and copying by ensuring text has a Unicode representation.

For PDF/X-1a, consider using a PDF/X-1a preset.

For PDF/X-4, consider also setting an output intent with the TargetProfile parameter, or use the PDF/X-4 Preset.

Rendering controls

Parameter

Possible values

Description

RenderResolution

1 to 32768

Sets the resolution of page portions that must be rendered (for example, to flatten transparency). The default is 300dpi.

RenderedImageCompression

Auto

Flate

DCT

LZW

RLE

Set the desired image compression for images that are the result of rendering. The default is eICFlate. If set to auto, flate is used.

This is advisory only and may not be honored in all cases. For example, PDF/A does not allow LZW.

Image Downsampling and Compression

Parameter

Possible values

Description

MonoImageDownsamplingResolution

0 to 32768

The desired output resolution, in dpi. Pass 0 to leave images unchanged, which is the default.

MonoImageDownsamplingThreshold

0 to 32768

The threshold above which images are reduced to the desired resolution. Pass 0 to use the resolution.

MonoImageDownsamplingMethod

Subsample

Average

Bicubic

The method to use when downsampling. The default is subsample for monochrome images; using any other method results in grayscale output.

GrayImageDownsamplingResolution

0 to 32768

The desired output resolution, in dpi. Pass 0 to leave images unchanged, which is the default.

GrayImageDownsamplingThreshold

0 to 32768

The threshold above which images are reduced to the desired resolution. Pass 0 to use the resolution.

GrayImageDownsamplingMethod

Subsample

Average

Bicubic

The method to use when downsampling. The default is bicubic for gray images.

ColorImageDownsamplingResolution

0 to 32768

The desired output resolution, in dpi. Pass 0 to leave images unchanged, which is the default.

ColorImageDownsamplingThreshold

0 to 32768

The threshold above which images are reduced to the desired resolution. Pass 0 to use the resolution.

ColorImageDownsamplingMethod

Subsample

Average

Bicubic

The method to use when downsampling. The default is bicubic for color and grayscale images.

The downsampling options described here don't always produce the expected result. See Downsampling of masked images for further details.

ColorImageCompression

Auto

Flate

DCT

LZW

RLE

Set the desired image compression for color images that need to be re-encoded. The default is eICAuto.

CCITT is not allowed for color images.

This is advisory only and may not be honored in all cases.

GrayImageCompression

Auto

Flate

DCT

LZW

RLE

Set the desired image compression for gray images that need to be re-encoded. The default is Auto.

CCITT is not allowed for gray images.

This is advisory only and may not be honored in all cases. For example, PDF/A does not allow LZW.

MonoImageCompression

Auto

CCITT

Flate

Set the desired image compression for monochrome images that need to be re-encoded. The default is CCITT.

JPEG/DCT is not allowed for mono images, and auto is set to CCITT.

This is advisory only and may not be honored in all cases. For example, PDF/A does not allow LZW.

UseMaskResolutionForMaskedImages

true

false

If true, the target resolution and threshold applied to the mask are also applied to the image.

If false, then the mask and the image are evaluated separately and a downsampling resolution and threshold are chosen. This mode enables the image and mask to be downsampled to different resolutions.

The default is true.

Has no effect if downsampling is not enabled.

DownsampleMaskedImages

true

false

Sets whether to downsample masked images. The default is true.

This setting is ignored if downsampling is not enabled.

JPEGQuality

1 to 5

Sets the JPEG quality to use when compressing images in DCT format. The default is 3 - medium quality.

JPEGChromaSubsampling

true

false

Chroma subsampling is desirable for natural images, as it can result in lower file sizes without significantly lowering perceived quality. However, for artificial images such as rasterized text sharp transitions from one color to another are present, the result can be unwanted artifacts that compromise the perceived quality of image.

This setting is used in conjunction with JPEGQuality. The default value is true (on) for a JPEGQuality of 1, 2, or 3 and false (off) for a JPEGQuality of 4 or 5. This setting allows the default to be overridden, for example by setting:

CODE

JPEGQuality=3, JPEGChromaSubsampling=false

The combination of these two settings keeps the output file size low without compromising the quality of artificial images. They should be set in the order shown (that is, JPEGQuality first).

Color spaces and conversion

Parameter

Possible values

Description

TargetColorSpace

DeviceRGB

DeviceGray

DeviceCMYK

By default, the target color space is used if anything must be rendered or color-converted. The default behavior is to apply this only when required. Use ConvertAllColors if converting everything is required.

For PDF/A-1b output, an OutputIntents dictionary is created for this color space. LAB color spaces may not be used as a destination color space for PDF/A.

For PDF/X-1a output, only DeviceCMYK is supported; this setting is ignored.

TargetProfile

Path to ICC profile

Sets the target color space for the output using an ICC profile.

By default, the target color space is used if anything must be rendered or color-converted. The default behavior is to apply this only when required. Use ConvertAllColors if converting everything is required.

When used in conjunction with "Preset=PDF/X-4" the OutputIntent of the target PDF is set to this profile.

ConvertAllColors

true

false

Sets whether all content should be color-converted to the target space set by TargetProfile.

The default is false.

This parameter is ignored and assumed true when writing to PDF/A-1b or PDF/X-1a format output.

ConvertGray

true

false

Set whether gray colors should be subject to color conversion (that is, colors using DeviceGray, sGray, or single-component ICC color spaces).

The default is true.

This parameter is ignored unless ConvertAllColors = true.

OverrideMaximumICCVersionMajor

integer

Override the maximum allowed ICC profile version for PDF output

Different PDF versions allow different ICC profile versions to be embedded. PDF/X-4 for example, by a strict reading of the specification, allows ICC profiles of version 4.2 or earlier. However, some consumers allow newer ICC Profiles to be used. This API allows the maximum ICC version to be overridden. Only do this if it is certain that the downstream consumers are able to handle the setting.

The default value is 0,0 indicating that the maximum version for the current PDF output version is used.

OverrideMaximumICCVersionMinor

integer

Pages: Compression, Linearization & Rotation

Parameter

Possible values

Description

CompressPages

true

false

Set whether compression should be applied to page content. The default is true.

If you use incremental output, the content of unedited pages is not affected.

Creating an uncompressed PDF is not significantly larger, but it can be viewed or edited in a text editor, which is useful for debugging purposes.

Linearize

true

false

The default is false. When true, a PDF optimized for byte serving (for example from a web server) is produced. This is generally a slow operation.

AutoRotatePages

true

false

Set whether pages should be automatically rotated. The default is false.

If you use incremental output, the content of unedited pages is not affected.

If true, pages are automatically rotated based on the prevalent text direction on the page. If you use incremental output, non-modified pages are not subject to this setting.

The rotation is not a physical rotation of content, merely the PDF Page's view rotate is set appropriately.

Font handling

Parameter

Possible values

Description

EmbedBase14Fonts

true

false

Set whether the base 14 PDF fonts should be forcibly embedded. If true, this overrides the embedding settings in IDOMFontOpenType. Only the standard 14 fonts are not affected by this; use setEmbedFonts() to affect other fonts.

If you use incremental output, the content of unedited pages is not affected.

The default is false. This setting is ignored for PDF/A and PDF/X where it is forced to true.

EmbedFonts

true

false

Set whether fonts should be forcibly embedded. If true, this overrides the embedding settings in each IDOMFontOpenType. The standard 14 fonts are not affected by this; use setEmbedBaseFonts() instead.

If you use incremental output, the content of unedited pages is not affected.

The default is false. This setting is ignored for PDF/A and PDF/X where it is forced to true.

SubsetFonts

true

false

Set whether embedded fonts should be subset or not. The default is true.

This is a preference only. Some font types may require subsetting based on context.

If you use incremental output, the content of unedited pages is not affected.

AlwaysEmbed

fontlist

Provide a list of font names that should always be embedded, regardless of the settings for setEmbedFonts() or setEmbedBase14Fonts(). This setting is ignored for PDF/A.

If you use incremental output, the content of unedited pages is not affected.

The fontlist is a string with the fonts delimited with semicolons (backslashes are used as an escape character).

NeverEmbed

fontlist

Provide a list of font names that should never be embedded, regardless of the settings for setEmbedFonts() or setEmbedBase14Fonts(). This setting is ignored for PDF/A.

If you use incremental output, the content of unedited pages is not affected.

The fontlist is a string with the fonts delimited with semicolons (backslashes are used as an escape character).

AllowRestrictedFonts

true

false

Allow restricted fonts to be embedded in the output.

If true, fonts that flag that they should not be embedded are allowed to be embedded. If false, then such fonts are not embedded. Set this to true if you have sufficient permissions to do so.

For PDF/X-4 and PDF/A-2b output, the output instead fails if this setting is false and a restricted font is encountered.

The default is false.

EnableTrueTypeNotDef

true

false

Enable the use of a True Type font's /.notdef glyph in the output.

If true, a character that does not have a glyph or that has been linked to the /.notdef glyph is replaced by the /.notdef glyph.

If false, a character that does not have a glyph or that has been linked to the /.notdef glyph is ignored.

For PDF/X-4 and PDF/A-2b output, the flag is set to true anyway. This flag is also ignored if BlockNotdefGlyphs() is set to true.

The default is true.

BlockNotdefGlyphs

true

false

Set whether to block notdef glyphs from PDF output.

If true, notdef glyphs that are not-marking are dropped, and if a marking notdef character is encountered, an error is thrown. Also if true, the setting EnableTrueTypeNotDef() is ignored.

This setting is ignored for PDF/A and PDF/X.

The default is false.

Emit30CmapSubtableForSymbolicTrueTypeFonts

true

false

Set whether to add a 3,0 ("Windows") "cmap" subtable to symbolic TrueType fonts in PDF output.

If true, a 3,0 cmap subtable is emitted alongside a 1,0 format subtable for symbolic TrueType fonts. If false, only the 1,0 subtable is emitted.

This setting is ignored for PDF/A and PDF/X.

The default is true.

Such subtables are required for compatibility with some PDF consumers, and are well tolerated by most PDF consumers. However, some preflight tools may emit errors. This can be set to false to afford compatibility with such tools. If you're unsure, please contact Mako support.

EmbedIdentityCidFonts

true

false

Set whether to embed IdentityCID fonts. The default is true.

When not embedded, there is risk of incorrect output should a glyph that’s different from the original, but with the same glyph ID, is selected from a font resident on the consumer’s system.

Encryption

Parameter

Possible values

Description

OwnerPassword

string

Used to encrypt (i.e., protect) the PDF security settings.

UserPassword

string

Used to encrypt the PDF. PDF consumers require this password to decrypt, for example Acrobat will prompt for a password when opening an encrypted PDF.

If encryption is enabled, at least one password must be supplied. If only a user password is supplied, it will also be used for the owner password.

KeyLength

number

The key length to use. Must be 0, 40, 128 or 256.

Setting a key length of zero disables encryption.

The encryption algorithm will be chosen based on the output PDF version. Not all key lengths are available for all versions, and an exception will be thrown if an unavailable key length is chosen.

Some permissions flags are ignored for 40 bit output: eFillFormAllowed, eExtractionAllowed, eAssemblyAllowed and eHighQualityPrintAllowed are ignored.

If encryption is enabled, incremental output is disabled.

Permissions

 number

The permissions bit mask for the output PDF. The bits map to these permissions, as follows:

  • Allow printing (bit 3) (4)

  • Allow editing (bit 4) (8)

  • Allow copying (bit 5) (16)

  • Allow annotation editing (bit 6) (32)

  • Allow form filling (bit 9) (256)

  • Allow content extraction in support of accessibility (bit 10) (512)

  • Allow document assembly (bit 11) (1024)

  • Allow high-resolution printing (bit 12) (2048)

  • All operations permitted (4092)

EncryptMetadata

true

false

Whether or not to encrypt metadata.

The default is false. Must be set to true if a 40 bit key length is specified.

Miscellaneous

Parameter

Possible values

Description

Producer

string

Sets the producer string, overriding the default value that is set to Mako Vx.x.x, where x.x.x is the version number.

ForceEmitPageGroup

true

false

If an input PDF page contains a transparency page group, Mako does not emit a page group in an output PDF unless it detects that the page actually contains transparency. This default behavior is overridden by setting this to true. The default is false. As true is a safe setting in all circumstances, future versions of Mako may make this the default behavior.

ForceMediaBoxOriginZero

true

false

In Mako 5.2.1, a change was made such that the MediaBox was retained as-is when writing non-incremental pages to PDF. Prior to this change, incremental pages always retained their (possibly non-zero) origin, whereas non-incremental pages would have their MediaBox origin reset to 0,0. Setting this parameter to true (default is false) forces the page MediaBox box origin to 0,0. Annotations and Crop/Art/Trim/etc. boxes are written using values relative to the top left, so this setting also affects those.

AllowOptionalContentUpdateDuringWrite

true

false

Allows Optional Content to be updated while an IOutputWriter is in progress.

For this to work, groups being used on a given page must have been added to the optional content before writing that page. The default is false.

Deleting groups is not advisable.

Editing groups does not reliably result in the edits being honored; it is undefined behavior and should be avoided.

ValidateXmp

true

false

When writing output, XMP properties that do not use the schemas defined by the XMP Specification, or related ISO standards such as PDF/X or PDF/A, are dropped.

Set to false to override this behavior and write such XMP content to the output. The default is true.

Using arbitrary schemas may produce non-conformant output when writing to PDF/X or PDF/A, and it is advised to leave this set to true (the default) when writing to PDF/X or PDF/A.

NonUtf8InkNameFallbackEncoding

Auto

MacRoman

Windows1252

PDFText

ShiftJIS

When saving to PDF/X-4 or PDF/A-2b, Mako is required to convert to UTF-8 color names that are not already encoded as such in order to conform to the respective standard.

Set to Auto (default) to have Mako make its best choice from the text encoding types listed left.

Alternatively, the other choices for this setting can be used to to force the use of a specific encoding.

 




JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.