IXPSOutput::setParameter

IXPSOutput supports several parameters that control how the XPS is written. These can be set in code in two ways. For example, to set the resolution to use if page content requires rendering, the code is

IXPSOutputPtr output = IXPSOutput::create(jawsMako);
output->setRenderResolution(300);

The same parameter can be expressed as two strings:

IXPSOutputPtr output = IXPSOutput::create(jawsMako);
output->setParameter("RenderResolution", "300");

This method was added to support scenarios where it is necessary to set an output parameter at runtime, for example in a printer driver where the user is offered options from a menu.

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

makoconverter MyInput.pdf MyOutput.xps MergeAdjacentImages=true

The following settings are supported.

Parameter

Possible values

Description

RenderResolution

1 to 32768

Sets the resolution of page portions that must be rendered. The default is 300dpi

MergeAdjacentImages

true

false

Set if the XPS output should attempt to merge adjacent images. The default is true.

ColorImageFormat

Auto

JPEG

PNG

TIFF

Set the desired image format for color images that need to be reencoded for XPS output. The default is eEFAuto.

Note: this is advisory only and may not be honoured in all cases if the image cannot be represented in XPS in the desired form.

GrayImageFormat

Auto

JPEG

PNG

TIFF

Set the desired image format for gray images that need to be reencoded for XPS output. The default is eEFAuto.

Note: this is advisory only and may not be honoured in all cases if the image cannot be represented in XPS in the desired form.

MonoImageFormat

Auto

JPEG

PNG

TIFF

Set the desired image format for monochrome images that need to be reencoded for XPS output. The default is eEFAuto.

Note: this is advisory only and may not be honoured in all cases if the image cannot be represented in XPS in the desired form.

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

true

false

Uniquely name all fonts used in the XPS produced by Mako, using a prefix of randomly chosen characters.
For use with some XPS consumers that get confused by multiple fonts having the same name.
StripUnicode*

true

false

Can only be set with setParameter(), eg setParameter("StripUnicode", "true");

When set to true, will remove all Unicode strings from the emitted XPS. Instead, explicit glyph IDs will be used.

*New in Mako 5.1