Abstract output sink that can output DOM to a file or stream in a given output format. More...
#include <jawsmako.h>
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 ¶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 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 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. | |
Abstract output sink that can output DOM to a file or stream in a given output format.
|
static |
Create an output for writing source in the given format.
The following formats are currently supported: - PDF - XPS - PostScript - PCL/XL - PCL5e - PCL5c
jawsMako | The JawsMako instance. |
format | The file format of the output file. |
progressMonitor | The progress monitor which allows aborting an operation or registering a progress callback. |
|
pure virtual |
Create an output writer for the given assembly, targeting a stream.
assembly | The document assembly for output. The assembly need not be populated with documents. |
stream | The stream for the output. |
|
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.
assembly | The document assembly for output. The assembly need not be populated with documents. |
pathToFile | The path to the output file on disk. |
|
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.
assembly | The document assembly for output. The assembly need not be populated with documents. |
pathToFile | The path to the output file on disk. |
|
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".
|
pure virtual |
Write the given document assembly to a stream.
assembly | The document assembly to be written. |
stream | The stream to write to. |
|
pure virtual |
Write the given document assembly to a file on disk, specified by a wide character string.
assembly | The document assembly to be written. |
pathToFile | The path to the output file on disk |
|
pure virtual |
Write the given document assembly to a file on disk.
assembly | The document assembly to be written. |
pathToFile | The path to the output file on disk. |