Interface for the XPS IOutput class. More...
#include <xpsoutput.h>
Public Member Functions | |
virtual void | setCopyExistingXPSPartsWherePossible (bool copy)=0 |
Set whether 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. | |
virtual void | setMergeFonts (bool merge)=0 |
Set whether an attempt will be made to merge disparate subsets of a font into a single font. | |
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. | |
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 color images. | |
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. | |
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. | |
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). | |
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. | |
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. | |
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 re-encoded for XPS output. The default is eEFAuto. | |
virtual void | setPreferredGrayImageFormat (IImageEncoderTransform::eEncodeFormat format)=0 |
Set the desired image format for gray images that need to be re-encoded for XPS output. The default is eEFAuto. | |
virtual void | setPreferredMonoImageFormat (IImageEncoderTransform::eEncodeFormat format)=0 |
Set the desired image format for monochrome images that need to be re-encoded for XPS output. The default is eEFAuto. | |
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. | |
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. | |
virtual void | setAlwaysUseVisualBrushesForMaskedBrushes (bool useVisual)=0 |
Set whether to use equivalent XPS Visual brushes for certain types of IDOMMaskedBrush brushes to work around issues with Microsoft's XPS viewer. | |
![]() | |
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 ¶m, 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 assemblies with certain security permission flags are allowed to be written by this output. | |
virtual void | writeAssembly (const IDocumentAssemblyPtr &assembly, const U8String &pathToFile)=0 |
Write the given document assembly to a file on disk. | |
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. | |
virtual void | writeAssembly (const IDocumentAssemblyPtr &assembly, const IOutputStreamPtr &stream)=0 |
Write the given document assembly to a stream. | |
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. | |
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. | |
virtual IOutputWriterPtr | openWriter (const IDocumentAssemblyPtr &assembly, const IOutputStreamPtr &stream)=0 |
Create an output writer for the given assembly, targeting a stream. | |
![]() | |
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. | |
virtual int32 | getRefCount () const =0 |
Retrieve the current reference count of the actual object pointed to. | |
Static Public Member Functions | |
static JAWSMAKO_API IXPSOutputPtr | create (const IJawsMakoPtr &jawsMako, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr()) |
Create an XPS Output instance. | |
![]() | |
static JAWSMAKO_API IOutputPtr | create (const IJawsMakoPtr &jawsMako, eFileFormat format, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr()) |
Create an output for writing source in the given format. | |
Additional Inherited Members | |
![]() | |
virtual | ~IRCObject () |
Virtual destructor. | |
Interface for the XPS IOutput class.
|
pure virtual |
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.
transform | The color converter transform to apply. |
|
pure virtual |
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.
transform | The image encoder transform to apply. |
|
pure virtual |
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.
transform | The renderer transform to apply. |
|
static |
Create an XPS Output instance.
jawsMako | The IJawsMako object. |
progressMonitor | A progress monitor to allow aborting an operation or to register a progress callback. |
|
pure virtual |
Set whether to use equivalent XPS Visual brushes for certain types of IDOMMaskedBrush brushes to work around issues with Microsoft's XPS viewer.
When writing IDOMMaskedBrush to XPS, IDOMMaskedBrush::getEquivalentXPSBrush() will be used to convert the brush to an equivalent XPS brush. However, equivalent Visual brushes used in paths, while valid XPS, can render incorrectly when viewed in Microsoft's XPS viewer. Setting this to false attempts to work around this by writing such brushes in a way that allows them to be rendered correctly when viewed in the XPS viewer.
The default is true. Equivalent to calling setParameter() with the parameter name "AlwaysUseVisualBrushesForMaskedBrushes" with appropriate values (please refer to documentation).
useVisual | If true, always use Visual brushes for masked brushes. |
|
pure virtual |
Set the desired maximum resolution, threshold and downsampling method for color 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.
resolution | The desired output resolution, in dpi. Pass 0 to leave images unchanged, which is the default. |
threshold | The threshold above which images will be reduced to the desired resolution. Pass 0 to use the resolution. |
method | The method to use when downsampling. The default is bicubic for color images. |
|
pure virtual |
Set whether 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.
copy | If true, existing XPS parts will be copied where possible. |
|
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.
resolution | The desired output resolution, in dpi. Pass 0 to leave images unchanged, which is the default. |
threshold | The threshold above which images will be reduced to the desired resolution. Pass 0 to use the resolution. |
method | The method to use when downsampling. The default is bicubic for gray images. |
|
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.
quality | The desired quality level, with 1 being lowest quality and 5 being highest quality. |
|
pure virtual |
Set whether 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 advantageous 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.
merge | If true, fonts will be merged where possible. |
|
pure virtual |
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.
merge | If true, adjacent images will be merged into a single image |
|
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.
resolution | The desired output resolution, in dpi. Pass 0 to leave images unchanged, which is the default. |
threshold | The threshold above which images will be reduced to the desired resolution. Pass 0 to use the resolution. |
method | The method to use when downsampling. The default is subsample for monochrome images; using any other method will result in grayscale output. |
|
pure virtual |
Set the desired image format for color images that need to be re-encoded for XPS output. The default is eEFAuto.
Equivalent to calling setParameter() with the parameter name "ColorImageFormat" with appropriate values (please refer to documentation).
format | The desired format. |
|
pure virtual |
Set the desired image format for gray images that need to be re-encoded for XPS output. The default is eEFAuto.
Equivalent to calling setParameter() with the parameter name "GrayImageFormat" with appropriate values (please refer to documentation).
format | The desired format. |
|
pure virtual |
Set the desired image format for monochrome images that need to be re-encoded for XPS output. The default is eEFAuto.
Equivalent to calling setParameter() with the parameter name "MonoImageFormat" with appropriate values (please refer to documentation).
format | The desired format. |
|
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.
rename | If true, fonts will be renamed to ensure uniqueness. |
|
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.
resolution | The desired resolution in dpi. |
|
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.
subset | If true, fonts will be subsetted where possible. |
|
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).
targetSpace | The desired color space. Must be a simple or ICC space. |
|
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.
profile | The desired profile. |