Mako 7.4.0 API
Loading...
Searching...
No Matches
JawsMako::IPSOutput Class Referenceabstract

Interface for the PS IOutput class. More...

#include <psoutput.h>

Inheritance diagram for JawsMako::IPSOutput:

Public Types

enum  eImageCompression
 Enumeration for image compression formats.
 

Public Member Functions

virtual void setResolution (float resolution)=0
 Set the target resolution for the output, in dots per inch. The default is 600. Equivalent to calling setParameter with the parameter name "TargetResolution".
 
virtual void setStreamingOutput (bool enable=true)=0
 Set whether or not streaming output should be enabled.
 
virtual void setTargetColorSpace (const IDOMColorSpacePtr &targetSpace)=0
 Set the target color space for the intended output device. The default is DeviceCMYK. 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 intended output device using an ICC profile. Equivalent to calling setParameter() with the param name "TargetProfile" with the value as the path to the profile.
 
virtual void setConvertAllObjectsToTargetColorSpace (bool convert=true)=0
 Sets whether or not all objects should be converted to the target color space. If false, only objects that require rendering, or use a color space that cannot will represented in PostScript will be forcibly converted to the target color space. Exquivalent to calling setParameter() with the param name "ConvertAllObjectsToTargetColorSpace".
 
virtual void setIgnoreDeviceGrayDuringColorConversion (bool ignore=true)=0
 Sets whether to ignore DeviceGray objects when color conversion is to be performed. The default is true. Equivalent to calling setParameter() with the param name "IgnoreDeviceGrayDuringColorConversion".
 
virtual void setInjector (IPSInjector *injector)=0
 Set the IPSInjector instance to use to inject PostScript directly into the output PostScript stream at strategic points in the output process. Note that this routine does not take ownership of the passed pointer, which must remain allocated until after the output is complete.
 
virtual void setPreferredColorImageCompression (eImageCompression compression)=0
 Set the desired image compression for color images that need to be reencoded. The default is eICDCT.
 
virtual void setPreferredGrayImageCompression (eImageCompression compression)=0
 Set the desired image compression for gray images that need to be reencoded. The default is eICDCT.
 
virtual void setPreferredMonoImageCompression (eImageCompression compression)=0
 Set the desired image compression for monochrome images that need to be reencoded. The default is eICCCITT. JPEG/DCT is not allowed for mono images.
 
virtual void setJPEGQuality (uint8 quality)=0
 Set the JPEG quality to use when compressing images in DCT format. Equivalent to calling setParameter() with the parameter name "JPEGQuality" and the value being the required quality. The default is 3 - normal quality.
 
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 setAllowReusableImageStreams (bool allowReusableImageStreams)=0
 Sets whether to allow reusable streams when writing images.
 
- 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.
 
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.
 
- 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.
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to.
 

Static Public Member Functions

static JAWSMAKO_API IPSOutputPtr create (const IJawsMakoPtr &jawsMako, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr())
 Create a PS Output instance.
 
- 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.
 

Additional Inherited Members

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

Detailed Description

Interface for the PS IOutput class.

      Note that there is a limit on the number of PDF and PS
      output operations that may be in progress simultaneously.
      These are:
      - iOS - 1 PDF or PS output operation at a time
      - Android - 1 PDF or PS output operation at a time
      - Windows/MacOS/X 32 bit - 8 PDF or PS output operations at a time, subject to available memory
      - Windows/MacOS/X 64 bit - 96 PDF or PS output operations at a time for most tool chains
                               - VS2015 Static builds are currently limited to 48
      - Windows UWP - 1 PDF or PS output operation at a time

Member Function Documentation

◆ create()

static JAWSMAKO_API IPSOutputPtr JawsMako::IPSOutput::create ( const IJawsMakoPtr & jawsMako,
const IProgressMonitorPtr & progressMonitor = IProgressMonitorPtr() )
static

Create a PS Output instance.

Parameters
jawsMakoThe JawsMako instance.
progressMonitorThe progress monitor which allows aborting an operation or registering a progress callback.

◆ setAllowReusableImageStreams()

virtual void JawsMako::IPSOutput::setAllowReusableImageStreams ( bool allowReusableImageStreams)
pure virtual

Sets whether to allow reusable streams when writing images.

    When set to true, a single reusable stream (PostScript
    ReusableStreamDecode filter) will be used as the data source for any
    images that are considered to be reusable.

    This can produce significantly smaller output for content with lots
    of image reuse, but will increase the printer memory that is used.

    Currently, only color images will be considered for reuse.

    The default is false.

◆ setColorImageMaxResolution()

virtual void JawsMako::IPSOutput::setColorImageMaxResolution ( float resolution,
float threshold = 0.0f,
IDOMImageDownsamplerFilter::eDownsamplingMethod method = IDOMImageDownsamplerFilter::eBicubic )
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.

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 color images.

◆ setConvertAllObjectsToTargetColorSpace()

virtual void JawsMako::IPSOutput::setConvertAllObjectsToTargetColorSpace ( bool convert = true)
pure virtual

Sets whether or not all objects should be converted to the target color space. If false, only objects that require rendering, or use a color space that cannot will represented in PostScript will be forcibly converted to the target color space. Exquivalent to calling setParameter() with the param name "ConvertAllObjectsToTargetColorSpace".

The default is true.

◆ setGrayImageMaxResolution()

virtual void JawsMako::IPSOutput::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::IPSOutput::setJPEGQuality ( uint8 quality)
pure virtual

Set the JPEG quality to use when compressing images in DCT format. Equivalent to calling setParameter() with the parameter name "JPEGQuality" and the value being the required quality. The default is 3 - normal quality.

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

◆ setMonoImageMaxResolution()

virtual void JawsMako::IPSOutput::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.

◆ setPreferredColorImageCompression()

virtual void JawsMako::IPSOutput::setPreferredColorImageCompression ( eImageCompression compression)
pure virtual

Set the desired image compression for color images that need to be reencoded. The default is eICDCT.

CCITT is not allowed for color images.

Note: this is advisory only and may not be honoured in all cases.

Equivalent to calling setParameter() with the parameter name "ColorImageCompression" with appropriate values (please refer to documentation).

Parameters
compressionThe desired compression.

◆ setPreferredGrayImageCompression()

virtual void JawsMako::IPSOutput::setPreferredGrayImageCompression ( eImageCompression compression)
pure virtual

Set the desired image compression for gray images that need to be reencoded. The default is eICDCT.

CCITT is not allowed for gray images.

Note: this is advisory only and may not be honoured in all cases.

Equivalent to calling setParameter() with the parameter name "GrayImageCompression" with appropriate values (please refer to documentation).

Parameters
compressionThe desired compression.

◆ setPreferredMonoImageCompression()

virtual void JawsMako::IPSOutput::setPreferredMonoImageCompression ( eImageCompression compression)
pure virtual

Set the desired image compression for monochrome images that need to be reencoded. The default is eICCCITT. JPEG/DCT is not allowed for mono images.

Note: this is advisory only and may not be honoured in all cases.

Equivalent to calling setParameter() with the parameter name "MonoImageCompression" with appropriate values (please refer to documentation).

Parameters
compressionThe desired compression.

◆ setStreamingOutput()

virtual void JawsMako::IPSOutput::setStreamingOutput ( bool enable = true)
pure virtual

Set whether or not streaming output should be enabled.

    Streaming output provides output as soon as it is ready, sending
    it to the output file or stream. Fonts are defined incrementally
    and a number of standard document structure comments are
    deferred to the end job trailer. This mode is suitable for use
    with streaming consumers, such as printers.

    If streaming output is set to false, then the output is withheld
    until the entire assembly has been processed. This enables
    providing all document resources (such as fonts and color
    spaces up front), and may be more useful for applications that
    further process the PostScript.
    The default is true.

    Equivalent to calling setParameter with the parameter name
    "StreamingOutput".

◆ setTargetColorSpace()

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

Set the target color space for the intended output device. The default is DeviceCMYK. Equivalent to calling setParameter with the param name "TargetColorSpace" with appropriate values (please refer to documentation).

Parameters
targetSpaceThe desired color space. Must not be LAB, Indexed, DeviceN or scRGB. Any ICC space must have one, three, or four components.

◆ setTargetProfile()

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

Set the target color space for the intended output device using an ICC profile. 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: