Mako 7.3.0 API
JawsMako::IXPSOutput Class Referenceabstract

Interface for the XPS IOutput class. More...

#include <xpsoutput.h>

Inheritance diagram for JawsMako::IXPSOutput:

Public Member Functions

virtual void setCopyExistingXPSPartsWherePossible (bool copy)=0
 Set whether or not entire XPS parts should be copied from the original assembly source when writing that assembly if the part remains unchanged. This is almost always faster. This defaults to true, and is set to true when using the "Preserve" preset. However, any change to configuration will cause this to be set to false in order to force reprocessing for the configuration to take effect. However this setting may be set to true after other configuration has been changed.
 
virtual void setSubsetFonts (bool subset)=0
 Set whether fonts should be subset in the output. More...
 
virtual void setMergeFonts (bool merge)=0
 Set whether or not an attempt will be made to merge disparate subsets of a font into a single font. More...
 
virtual void setMergeImages (bool merge=true)=0
 Set if the XPS output should attempt to merge adjacent images. Equivalent to calling setParameter with "MergeAdjacentImages" as the parameter name. The default is true.
 
virtual void setRenameFonts (bool rename=true)=0
 Set if the XPS output should rename fonts to aid with problematic print environments. More...
 
virtual void setColorImageMaxResolution (float resolution, float threshold=0.0f, IDOMImageDownsamplerFilter::eDownsamplingMethod method=IDOMImageDownsamplerFilter::eBicubic)=0
 Set the desired maximum resolution, threshold and downsampling method for colour images. More...
 
virtual void setGrayImageMaxResolution (float resolution, float threshold=0.0f, IDOMImageDownsamplerFilter::eDownsamplingMethod method=IDOMImageDownsamplerFilter::eBicubic)=0
 Set the desired maximum resolution, threshold and downsampling method for gray images. More...
 
virtual void setMonoImageMaxResolution (float resolution, float threshold=0.0f, IDOMImageDownsamplerFilter::eDownsamplingMethod method=IDOMImageDownsamplerFilter::eSubsample)=0
 Set the desired maximum resolution, threshold and downsampling method for monochrome images. More...
 
virtual void setTargetColorSpace (const IDOMColorSpacePtr &targetSpace)=0
 Set the target color space for the output. The default behaviour is to, where possible, leave the color space of objects unchanged. Equivalent to calling setParameter with the param name "TargetColorSpace" with appropriate values (please refer to documentation). More...
 
virtual void setTargetProfile (const IDOMICCProfilePtr &profile)=0
 Set the target color space for the output using an ICC profile. The default behaviour is to, where possible, leave the color space of objects unchanged. Equivalent to calling setParameter() with the param name "TargetProfile" with the value as the path to the profile. More...
 
virtual void applyColorConverterTransform (const IColorConverterTransformPtr &transform)=0
 Apply the given color converter transform to the contents before writing to XPS. This supersedes the target color space parameters described above. This allows for more advanced configuration of the color spaces of the output.
 
virtual void setRenderResolution (uint32 resolution)=0
 Set the resolution to use if page content requires rendering in order to be output as XPS. The default is 150dpi. This is affected also by the maximum image resolution parameters. Equivalent to calling setParameter() with param name "RenderResolution" with the value as the desired resolution as value. More...
 
virtual void applyRendererTransform (const IRendererTransformPtr &transform)=0
 Apply the given renderer transform to the contents before writing to XPS. This supersedes the target color space parameters described above. This allows for more advanced configuration of rendering.
 
virtual void setPreferredColorImageFormat (IImageEncoderTransform::eEncodeFormat format)=0
 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. Equivalent to calling setParameter() with the parameter name "ColorImageFormat" with appropriate values (please refer to documentation). More...
 
virtual void setPreferredGrayImageFormat (IImageEncoderTransform::eEncodeFormat format)=0
 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. Equivalent to calling setParameter() with the parameter name "GrayImageFormat" with appropriate values (please refer to documentation). More...
 
virtual void setPreferredMonoImageFormat (IImageEncoderTransform::eEncodeFormat format)=0
 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. Equivalent to calling setParameter() with the parameter name "MonoImageFormat" with appropriate values (please refer to documentation). More...
 
virtual void setJPEGQuality (uint8 quality)=0
 Set the JPEG quality to use when encoding images in JPEG format. Equivalent to calling setParameter() with the parameter name "JPEGQuality" and the value being the required quality. More...
 
virtual void applyEncoderTransform (const IImageEncoderTransformPtr &transform)=0
 Apply the given image encoder transform to the contents before writing to XPS. This supersedes the image encoding parameters described above. This allows for more advanced configuration of image encoding.
 
- Public Member Functions inherited from JawsMako::IOutput
virtual void setPreset (const U8String &preset)=0
 Configure the output according to a general preset. Please see the supplied documentation for details of these presets. The default is "Preserve" which will attempt to produce output as close to the input as possible for the output format. A string value can be used for any parameter and will be converted as necessary.
 
virtual void setParameter (const U8String &param, const U8String &value)=0
 Apply a key value pair output parameter with a string value. The parameter name is case insensitive. Please refer to the supplied documentation for the details of the available parameters and their ranges.
 
virtual void setAllowedPermissionsFlags (uint32 allowedPermissions)=0
 Control whether or not assemblies with certain security permission flags are allowed to be written by this output. More...
 
virtual void writeAssembly (const IDocumentAssemblyPtr &assembly, const U8String &pathToFile)=0
 Write the given document assembly to a file on disk. More...
 
virtual void writeAssembly (const IDocumentAssemblyPtr &assembly, const String &pathToFile)=0
 Write the given document assembly to a file on disk, specified by a wide character string. More...
 
virtual void writeAssembly (const IDocumentAssemblyPtr &assembly, const IOutputStreamPtr &stream)=0
 Write the given document assembly to a stream. More...
 
virtual IOutputWriterPtr openWriter (const IDocumentAssemblyPtr &assembly, const U8String &pathToFile)=0
 Create an output writer for the given assembly, targeting a file on disk. This is designed to allow streaming output, or to deal with situations where an operation would require too much memory to hold an entire edited assembly in memory at once. More...
 
virtual IOutputWriterPtr openWriter (const IDocumentAssemblyPtr &assembly, const String &pathToFile)=0
 Create an output writer for the given assembly, targeting a file on disk. As above, but with the file specified in a wide character string. More...
 
virtual IOutputWriterPtr openWriter (const IDocumentAssemblyPtr &assembly, const IOutputStreamPtr &stream)=0
 Create an output writer for the given assembly, targeting a stream. More...
 
- Public Member Functions inherited from IRCObject
virtual void addRef () const =0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef () const =0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to. More...
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to. More...
 

Static Public Member Functions

static JAWSMAKO_API IXPSOutputPtr create (const IJawsMakoPtr &jawsMako, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr())
 Create an XPS Output instance. More...
 
- Static Public Member Functions inherited from JawsMako::IOutput
static JAWSMAKO_API IOutputPtr create (const IJawsMakoPtr &jawsMako, eFileFormat format, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr())
 Create an output for writing source in the given format. More...
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

Interface for the XPS IOutput class.

Member Function Documentation

◆ create()

static JAWSMAKO_API IXPSOutputPtr JawsMako::IXPSOutput::create ( const IJawsMakoPtr &  jawsMako,
const IProgressMonitorPtr &  progressMonitor = IProgressMonitorPtr() 
)
static

Create an XPS Output instance.

Parameters
jawsMakoThe IJawsMako object.
progressMonitorA progress monitor to allow aborting an operation or to register a progress callback.
Returns
IXPSOutputPtr The XPS output.

◆ setColorImageMaxResolution()

virtual void JawsMako::IXPSOutput::setColorImageMaxResolution ( float  resolution,
float  threshold = 0.0f,
IDOMImageDownsamplerFilter::eDownsamplingMethod  method = IDOMImageDownsamplerFilter::eBicubic 
)
pure virtual

Set the desired maximum resolution, threshold and downsampling method for colour images.

The default behaviour is leave the image resolution unchanged. Equivalent to calling setParameter() with the param names "ColorImageDownsamplingResolution", "ColorImageDownsamplingThreshold" and "ColorImageDownsamplingMethod" with the respective values.

Parameters
resolutionThe desired output resolution, in dpi. Pass 0 to leave images unchanged, which is the default.
thresholdThe threshold above which images will be reduced to the desired resolution. Pass 0 to use the resolution.
methodThe method to use when downsampling. The default is bicubic for colour images.

◆ setGrayImageMaxResolution()

virtual void JawsMako::IXPSOutput::setGrayImageMaxResolution ( float  resolution,
float  threshold = 0.0f,
IDOMImageDownsamplerFilter::eDownsamplingMethod  method = IDOMImageDownsamplerFilter::eBicubic 
)
pure virtual

Set the desired maximum resolution, threshold and downsampling method for gray images.

The default behaviour is leave the image resolution unchanged. Equivalent to calling setParameter() with the param names "GrayImageDownsamplingResolution", "GrayImageDownsamplingThreshold" and "GrayImageDownsamplingMethod" with the respective values.

Parameters
resolutionThe desired output resolution, in dpi. Pass 0 to leave images unchanged, which is the default.
thresholdThe threshold above which images will be reduced to the desired resolution. Pass 0 to use the resolution.
methodThe method to use when downsampling. The default is bicubic for gray images.

◆ setJPEGQuality()

virtual void JawsMako::IXPSOutput::setJPEGQuality ( uint8  quality)
pure virtual

Set the JPEG quality to use when encoding images in JPEG format. Equivalent to calling setParameter() with the parameter name "JPEGQuality" and the value being the required quality.

Parameters
qualityThe desired quality level, with 1 being lowest quality and 5 being highest quality.

◆ setMergeFonts()

virtual void JawsMako::IXPSOutput::setMergeFonts ( bool  merge)
pure virtual

Set whether or not an attempt will be made to merge disparate subsets of a font into a single font.

The default is false. Equivalent to calling setParameter with "MergeFonts" as the parameter name.

Some formats such as PostScript and XPS tend to include many font subsets and for output it is often avantageous to attempt to merge these fonts into a single font where possible.

Note that it is possible to enable both font subsetting and merging at the same time. In this case merging happens first, followed by subsetting of the merged results.

◆ setMonoImageMaxResolution()

virtual void JawsMako::IXPSOutput::setMonoImageMaxResolution ( float  resolution,
float  threshold = 0.0f,
IDOMImageDownsamplerFilter::eDownsamplingMethod  method = IDOMImageDownsamplerFilter::eSubsample 
)
pure virtual

Set the desired maximum resolution, threshold and downsampling method for monochrome images.

The default behaviour is leave the image resolution unchanged. Equivalent to calling setParameter() with the param names "MonoImageDownsamplingResolution", "MonoImageDownsamplingThreshold" and "MonoImageDownsamplingMethod" with the respective values.

Parameters
resolutionThe desired output resolution, in dpi. Pass 0 to leave images unchanged, which is the default.
thresholdThe threshold above which images will be reduced to the desired resolution. Pass 0 to use the resolution.
methodThe method to use when downsampling. The default is subsample for monochrome images; using any other method will result in grayscale output.

◆ setPreferredColorImageFormat()

virtual void JawsMako::IXPSOutput::setPreferredColorImageFormat ( IImageEncoderTransform::eEncodeFormat  format)
pure virtual

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. Equivalent to calling setParameter() with the parameter name "ColorImageFormat" with appropriate values (please refer to documentation).

Parameters
formatThe desired format.

◆ setPreferredGrayImageFormat()

virtual void JawsMako::IXPSOutput::setPreferredGrayImageFormat ( IImageEncoderTransform::eEncodeFormat  format)
pure virtual

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. Equivalent to calling setParameter() with the parameter name "GrayImageFormat" with appropriate values (please refer to documentation).

Parameters
formatThe desired format.

◆ setPreferredMonoImageFormat()

virtual void JawsMako::IXPSOutput::setPreferredMonoImageFormat ( IImageEncoderTransform::eEncodeFormat  format)
pure virtual

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. Equivalent to calling setParameter() with the parameter name "MonoImageFormat" with appropriate values (please refer to documentation).

Parameters
formatThe desired format.

◆ setRenameFonts()

virtual void JawsMako::IXPSOutput::setRenameFonts ( bool  rename = true)
pure virtual

Set if the XPS output should rename fonts to aid with problematic print environments.

This is useful when the produced XPS is being sent to a print pipeline; some XPS drivers may have problems dealing with multiple fonts with the same name. If true, every font will be renamed and all chosen names will be unique. A PDF-style tag will be prefixed, and the font name limited to 63 characters.

Equivalent to calling setParameter with "RenameFonts" as the parameter name.

This is not required for regular XPS output and as a result the default is false.

◆ setRenderResolution()

virtual void JawsMako::IXPSOutput::setRenderResolution ( uint32  resolution)
pure virtual

Set the resolution to use if page content requires rendering in order to be output as XPS. The default is 150dpi. This is affected also by the maximum image resolution parameters. Equivalent to calling setParameter() with param name "RenderResolution" with the value as the desired resolution as value.

Parameters
resolutionThe desired resolution in dpi.

◆ setSubsetFonts()

virtual void JawsMako::IXPSOutput::setSubsetFonts ( bool  subset)
pure virtual

Set whether fonts should be subset in the output.

     The default is false. Equivalent to calling setParameter with
     "SubsetFonts" as the parameter name.

     Note that all fonts may not be subsetted; for some subsetting may be
     forbidden, and for others there may be little gain in subsetting.

◆ setTargetColorSpace()

virtual void JawsMako::IXPSOutput::setTargetColorSpace ( const IDOMColorSpacePtr &  targetSpace)
pure virtual

Set the target color space for the output. The default behaviour is to, where possible, leave the color space of objects unchanged. Equivalent to calling setParameter with the param name "TargetColorSpace" with appropriate values (please refer to documentation).

Parameters
targetSpaceThe desired color space. Must be a simple or ICC space.

◆ setTargetProfile()

virtual void JawsMako::IXPSOutput::setTargetProfile ( const IDOMICCProfilePtr &  profile)
pure virtual

Set the target color space for the output using an ICC profile. The default behaviour is to, where possible, leave the color space of objects unchanged. Equivalent to calling setParameter() with the param name "TargetProfile" with the value as the path to the profile.

Parameters
profileThe desired profile.

The documentation for this class was generated from the following file: