Mako 7.3.0 API
JawsMako::IOutput Class Referenceabstract

Abstract output sink that can output DOM to a file or stream in a given output format. More...

#include <jawsmako.h>

Inheritance diagram for JawsMako::IOutput:

Public Member Functions

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 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

Abstract output sink that can output DOM to a file or stream in a given output format.

Member Function Documentation

◆ create()

static JAWSMAKO_API IOutputPtr JawsMako::IOutput::create ( const IJawsMakoPtr &  jawsMako,
eFileFormat  format,
const IProgressMonitorPtr &  progressMonitor = IProgressMonitorPtr() 
)
static

Create an output for writing source in the given format.

     The following formats are currently supported:
     - PDF
     - XPS
     - PostScript
     - PCL/XL
     - PCL5e
     - PCL5c
Parameters
jawsMakoThe JawsMako instance.
formatThe file format of the output file.
progressMonitorThe progress monitor which allows aborting an operation or registering a progress callback.
Returns
IOutputPtr the new output

◆ openWriter() [1/3]

virtual IOutputWriterPtr JawsMako::IOutput::openWriter ( const IDocumentAssemblyPtr &  assembly,
const IOutputStreamPtr &  stream 
)
pure virtual

Create an output writer for the given assembly, targeting a stream.

Parameters
assemblyThe document assembly for output. The assembly need not be populated with documents.
streamThe stream for the output.
Returns
IOutputWriterPtr The new output writer.

◆ openWriter() [2/3]

virtual IOutputWriterPtr JawsMako::IOutput::openWriter ( const IDocumentAssemblyPtr &  assembly,
const String pathToFile 
)
pure virtual

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.

Parameters
assemblyThe document assembly for output. The assembly need not be populated with documents.
pathToFileThe path to the output file on disk.
Returns
IOutputWriterPtr The new output writer.

◆ openWriter() [3/3]

virtual IOutputWriterPtr JawsMako::IOutput::openWriter ( const IDocumentAssemblyPtr &  assembly,
const U8String pathToFile 
)
pure virtual

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.

Parameters
assemblyThe document assembly for output. The assembly need not be populated with documents.
pathToFileThe path to the output file on disk.

◆ setAllowedPermissionsFlags()

virtual void JawsMako::IOutput::setAllowedPermissionsFlags ( uint32  allowedPermissions)
pure virtual

Control whether or not assemblies with certain security permission flags are allowed to be written by this output.

If allowed permissions is set to IDOMStandardPDFSecurityInfo::eEverythingAllowed then no checking for assembly permissions will be performed.

Otherwise, the parameter is the or'd combination of IDOMStandardPDFSecurity::ePermissionsFlags that is checked against the operations allowed by the assembly's security (from IAssembly::getSecurityInfo()). The assembly allows an operation corresponding to a flag set in the parameter, then output will be allowed to continue. Otherwise, an IError exception with the error code JM_ERR_ASSEMBLY_WRITE_FORBIDDEN will be thrown.

If the source assembly has no permissions information, or shows that the owner password was supplied, the output will proceed regardless.

The default depends on the individual output. For print-centric outputs (PostScript, PCL5, PCLXL) the default is IDOMStandardPDFSecurityInfo::eHighQualityPrintAllowed. That is, permission-protected jobs that are permitted to print to high resolution will be allowed to convert. For all other outputs, the default is 0, which means that if any permissions information is present and the owner password was not supplied, then no output will be allowed in order to preserve the intentions of the input assembly.

For example, if the requirement is to generate output to be fed to a printer, then calling: setAllowedPermissions(IDOMStandardPDFSecurityInfo::eHighQualityPrintAllowed) would allow permission-protected jobs that allow high quality output to proceed.

Note: only permissions specified in the standard security handler Revisions 2 and 3 are currently checked.

Equivalent to calling setParameter() with the param name "AllowedPermissions".

◆ writeAssembly() [1/3]

virtual void JawsMako::IOutput::writeAssembly ( const IDocumentAssemblyPtr &  assembly,
const IOutputStreamPtr &  stream 
)
pure virtual

Write the given document assembly to a stream.

Parameters
assemblyThe document assembly to be written.
streamThe stream to write to.

◆ writeAssembly() [2/3]

virtual void JawsMako::IOutput::writeAssembly ( const IDocumentAssemblyPtr &  assembly,
const String pathToFile 
)
pure virtual

Write the given document assembly to a file on disk, specified by a wide character string.

Parameters
assemblyThe document assembly to be written.
pathToFileThe path to the output file on disk

◆ writeAssembly() [3/3]

virtual void JawsMako::IOutput::writeAssembly ( const IDocumentAssemblyPtr &  assembly,
const U8String pathToFile 
)
pure virtual

Write the given document assembly to a file on disk.

Parameters
assemblyThe document assembly to be written.
pathToFileThe path to the output file on disk.

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