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

Interface for the PDF IOutput class. More...

#include <pdfoutput.h>

Inheritance diagram for JawsMako::IPDFOutput:

Public Types

enum  ePDFVersion {
  ePDF1_3 = MAKE_PDF_VERSION(1,3) , ePDF1_4 = MAKE_PDF_VERSION(1,4) , ePDF1_5 = MAKE_PDF_VERSION(1,5) , ePDF1_6 = MAKE_PDF_VERSION(1,6) ,
  ePDF1_7 = MAKE_PDF_VERSION(1,7) , ePDF2_0 = MAKE_PDF_VERSION(2,0) , ePDFA1b = MAKE_PDF_VERSION(1,4) | (MAKE_PDF_VARIANT (65, 1, 98)) , ePDFA2b = MAKE_PDF_VERSION(1,7) | (MAKE_PDF_VARIANT (65, 2, 98)) ,
  ePDFA3b = MAKE_PDF_VERSION(1,7) | (MAKE_PDF_VARIANT (65, 3, 98)) , ePDFA2u = MAKE_PDF_VERSION(1,7) | (MAKE_PDF_VARIANT (65, 2, 117)) , ePDFUA = MAKE_PDF_VERSION(1,7) | (MAKE_PDF_VARIANT (65, 2, 85)) , ePDFX1a = MAKE_PDF_VERSION(1,4) | (MAKE_PDF_VARIANT (88, 1, 97)) ,
  ePDFX4 = MAKE_PDF_VERSION(1,6) | (MAKE_PDF_VARIANT (88, 4, 0))
}
 Supported versions. More...
 
enum  eImageCompression { }
 Enumeration for image compression formats. More...
 
enum  ePdfDeviceNHandling {
  ePDNHDefault = 0 , ePDNHFailOnMissingColorantInformation = 0x1 , ePDNHFailOnInconsistentColorantInformation = 0x2 , ePDNHFailIfBetterColorantInformationFoundAfterFirstUse = 0x4 ,
  ePDNHFailIfDotGainFound = 0x8 , ePDNFailOnMismatchedDeviceNProcessSpace = 0x10 , ePDNFailOnNonUtf8ColorantName = 0x20
}
 Flags controlling PDF/X-4 and PDF/A-2 DeviceN handling. More...
 
enum  ePdfOptionalContentHandling { ePOCHDefault = 0 , ePOCHFailOnInconsistentConfigurationName = 0x1 , ePOCHFailOnInvalidOrder = 0x2 , ePOCHFailIfAutoStateFound = 0x4 }
 Flags controlling PDF/X-4 and PDF/A-2 Optional content.
Allows some control on what the PDF writer is allowed to invent, or what inconsistencies are considered safe to ignore.
Should an exception need to be raised, an IError with code EDL_ERR_INCOMPATIBLE_PDFX or EDL_ERR_INCOMPATIBLE_PDFA (depending on output version) will be thrown, where the error description will contain a short message outlining the problem that was encountered. More...
 
enum  ePdfExtendedGraphicsStateHandling { ePEGSHDefault = 0 , ePEGSHFailOnTransferFunction = 0x1 }
 Flags controlling PDF/X-4 and PDF/A-2 Extended Graphics State information Allows some control on what the PDF writer is allowed to invent, or what inconsistencies are considered safe to ignore. More...
 
enum  ePdfAlternateImageHandling { ePAIHDefault = 0 , ePAIHFailIfAlternatesFound = 0x1 , ePAIHFailIfDefaultForPrintingFound = 0x2 }
 Flags controlling PDF/X-4 and PDF/A-2 alternate image handling.
Allows control on what the PDF/X writer is allowed to invent, or what inconsistencies are considered safe to ignore.
For PDF/X-4, Alternate images are allowed, but no alternate image is allowed to specify that it is the default for printing (via the DefaultForPrinting key). By default, if an image with DefaultForPrinting set to true is present, then this image will be selected and the other alternate images shall be dropped.
For PDF/A-2b/u, Alternate images are not allowed at all. By default, we will apply the optional content rules for alternate images to select a single image as if the PDF was being printed.
Instead of this default, the following flags allow processing to stop in these situations.
Should an exception need to be raised, an IError with code EDL_ERR_INCOMPATIBLE_PDFX or EDL_ERR_INCOMPATIBLE_PDFA (depending on output version) will be thrown, where the error description will contain a short message outlining the problem that was encountered. More...
 
enum  eFormCJKCharacterSet
 A CJK character set.
 

Public Member Functions

virtual void setVersion (ePDFVersion version)=0
 Set the PDF version to generate.
 
virtual void setProducer (const U8String &producer)=0
 Set the Producer name for the output PDF.
 
virtual void setEnableIncrementalOutput (bool enable=true)=0
 Set whether or not incremental output should be enabled.
 
virtual void setLinearize (bool linearize=true)=0
 Set whether or not the output should be linearized.
 
virtual void setEncryption (uint32 keyLength, uint32 permissions, bool encryptMetadata=false, const U8String &ownerPassword="", const U8String &userPassword="")=0
 Set the encryption for the output PDF. The default is no encryption.
 
virtual void setPublicKeyEncryption (uint32 keyLength, const CEDLVector< CPDFRecipientsInfo > &recipients, bool encryptMetadata=false)=0
 Use certificate/public-key encryption for the output PDF. The default is no encryption.
 
virtual void setTargetColorSpace (const IDOMColorSpacePtr &targetSpace)=0
 Set the target color space for the output.
 
virtual void setTargetProfile (const IDOMICCProfilePtr &profile)=0
 Set the target color space for the output using an ICC profile.
 
virtual void setOutputIntent (const IOutputIntentPtr &outputIntent)=0
 Set an explicit output intent, or NULL to clear it.
 
virtual void setOutputIntents (const COutputIntentVect &outputIntents)=0
 Set a vector of output intents, or an empty vector to clear them.
 
virtual void setConvertAllColors (bool convert)=0
 Set whether or not all content should be color converted to the target space set by setTargetColorSpace().
 
virtual void setConvertGray (bool convert)=0
 Set whether or not gray colors should be subject to color conversion. That is, colors using DeviceGray, sGray, or single-component ICC colorspaces.
 
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 setDownsampleMaskedImages (bool downsampleMaskedImages)=0
 Set whether or not to downsample masked images.
 
virtual void setUseMaskResolutionForMaskedImages (bool useMaskResolutionSettingForMaskedImages)=0
 Set whether or not the mask resolution setting should be applied to the image portion of a masked image.
 
virtual void setRenderResolution (uint32 resolution)=0
 Set the resolution to use if page content requires rendering in order to be output. The default is 300dpi. 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 setPreferredColorImageCompression (eImageCompression compression)=0
 Set the desired image compression for color images that need to be reencoded. The default is eICAuto.
 
virtual void setPreferredGrayImageCompression (eImageCompression compression)=0
 Set the desired image compression for gray images that need to be reencoded. The default is eICAuto.
 
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, and auto will be set to CCITT.
 
virtual void setPreferredRenderedImageCompression (eImageCompression compression)=0
 Set the desired image compression for images that are the result of rendering. The default is eICFlate. If set to auto, flate will be used.
 
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.
 
virtual void setJPEGChromaSubsampling (bool subsample)=0
 Set whether or not to use chroma subsampling when compressing color images in DCT/JPEG format. Chroma subsampling improves compression by reducing the resolution of color information in the image, leaving luminance information at high resolution.
 
virtual void setReencodeImages (bool reencode)=0
 Set whether images should be reencoded.
 
virtual void setCompressPages (bool compressPages)=0
 Set whether or not compression should be applied to page content. The default is true.
 
virtual void setCompressObjects (bool compressObjects)=0
 Set whether or not to compress individual objects.
 
virtual void setAutoRotatePages (bool autoRotate)=0
 Set whether or not pages should be automatically rotated. The default is false.
 
virtual void setSubsetFonts (bool subset)=0
 Set whether embedded fonts should be subset or not. The default is true.
 
virtual void setEmbedFonts (bool embed)=0
 Set whether fonts should be forcibly embedded. If true, this overrides the embedding settings in each IDOMFontOpenType. The standard 14 fonts are not affected by this; use setEmbedBaseFonts() instead.
 
virtual void setEmbedBase14Fonts (bool embed)=0
 Set whether the base 14 PDF fonts should be forcibly embedded. If true, this overrides the embedding settings in IDOMFontOpenType. Only the standard 14 fonts are not affected by this; use setEmbedFonts() to affect other fonts.
 
virtual void setAlwaysEmbedFonts (CU8StringVect &fontNames)=0
 Provide a list of name of fonts that should be always embedded, regardless of the settings for setEmbedFonts() or setEmbedBase14Fonts(). This setting is ignored for PDF/A.
 
virtual void setNeverEmbedFonts (CU8StringVect &fontNames)=0
 Provide a list of name of fonts that should never be embedded, regardless of the settings for setEmbedFonts() or setEmbedBase14Fonts(). This setting is ignored for PDF/A.
 
virtual void setAllowRestrictedFonts (bool allowRestrictedFonts)=0
 Allow restricted fonts to be embedded in the output.
 
virtual void setEmbedIdentityCidFonts (bool embed)=0
 Set whether or not Identity CIDFonts should be embedded.
 
virtual void setEnableTrueTypeNotDef (bool enableTrueTypeNotDef)=0
 Enable the use of a True Type font's /.notdef glyph in the output.
 
virtual void setBlockNotdefGlyphs (bool blockNotdefGlyphs)=0
 Set whether to block notdef glyphs from PDF output.
 
virtual void setEmit30CmapSubtableForSymbolicTrueTypeFonts (bool emit)=0
 Set whether to add a 3,0 ("Windows") 'cmap' subtable to symbolic TrueType fonts in PDF output.
 
virtual void setForceEmitPageGroup (bool force)=0
 Set whether or not the page group should be forcibly written.
 
virtual void setForceMediaBoxOriginZero (bool force)=0
 Set whether or not the media box origin should be set to 0,0 in the output.
 
virtual void overrideMaximumICCVersion (uint32 majorVersion, uint32 minorVersion)=0
 Override the maximum allowed ICC profile version for PDF output.
 
virtual void setDeviceNErrorHandling (uint32 flags)=0
 Set flags controlling PDF/X-4 and PDF/A-2 DeviceN handling. See ePdfDeviceNHandling# for details.
 
virtual void setOptionalContentErrorHandling (uint32 flags)=0
 Set flags controlling PDF/X-4 and PDF/A-2 Optional Content handling. See ePdfOptionalContentHandling# for details.
 
virtual void setExtendedGraphicsStateErrorHandling (uint32 flags)=0
 Set flags controlling PDF/X-4 and PDF/A-2 Extended Graphics State handling. See ePdfExtendedGraphicsStateHandling# for details.
 
virtual void setAlternateImageErrorHandling (uint32 flags)=0
 Set flags controlling PDF/X-4 and PDF/A-2b alternate image handling See ePdfAlternateImageHandling# for details.
 
virtual void setNonUtf8InkNameFallbackEncoding (eInkFallbackEncoding fallbackEncoding)=0
 Set the fallback encoding to use when attempting to decode non-UTF8 compatible ink names for PDF/A-2 and PDF/X-4 output. Only consulted when ePDNFailOnNonUtf8ColorantName is unset in setDeviceNErrorHandling. See the two-parameter method of inkNameToString for how this is done.
 
virtual void setDefaultFormCJKLanguage (eFormCJKCharacterSet characterSet)=0
 Set the default CJK character set for forms. Used when generating form appearance streams, and is only used when the character set cannot be determined from the content of the form. The default is Japanese.
 
virtual void setRetainEmbeddedFiles (bool retainEmbeddedFiles)=0
 Allow embedded files to be retained in PDF/A and PDF/X-4 output.
 
virtual void setRetainClippedContent (bool retainClippedContent)=0
 Allow clipped out content to be retained in the output.
 
virtual void setAllowOptionalContentUpdateDuringWrite (bool allow)=0
 Allow updates to optional content to be made while the output is being written using an IOutputWriter.
 
virtual void setValidateXmp (bool validate)=0
 Validate XMP metadata.
 
- 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 IPDFOutputPtr create (const IJawsMakoPtr &jawsMako, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr())
 Create a PDF 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 PDF IOutput class.

Supported presets (use IOutput::setPreset) are:

  • "Preserve" which will attempt to produce output as close to the input as possible for the output format.
  • "PDF1.3" which will configure the output for PDF 1.3. In addition to setting the output version, this will also cause all objects to be color converted to DeviceRGB, but this may be overridden with setTargetSpace().
  • "General" - a general purpose PDF output for general document exchange and viewing. PDF 1.7, RGB.
  • "Print" - a higher quality/larger file size for print purposes. Uses PDF 1.4 for wide support.
  • "Web" - a general purpose PDF output for distributing documents online. PDF 1.7, RGB, Linearized.
  • "PDF/A-1b" - A preset for generating PDF/A-1b, RGB, with sensible defaults for resolution and downsampling.
  • "PDF/A-2b" - A preset for generating PDF/A-2b, RGB output intent, with sensible defaults for resolution and downsampling.
  • "PDF/A-2u" - A preset for generating PDF/A-2u, RGB output intent, with sensible defaults for resolution and downsampling.
  • "PDF/A-3b" - A preset for generating PDF/A-3b, RGB output intent, with sensible defaults for resolution and downsampling.
  • "PDF/UA" - A preset for generating PDF/UA, RGB output intent, with sensible defaults for resolution and downsampling. Note that this does not guarantee a valid PDF/UA document as a document is valid if and only if the content is tagged correctly (see IPDFOutput::setVersion() below).
  • "PDF/X-1a" - A preset for generating PDF/X-1a, CMYK (SWOP) with everything converted to CMYK.
  • "PDF/X-4" - A preset for generating PDF/X-4, CMYK (SWOP) with sensible defaults.

Note that when writing PDF output with multiple documents, only the forms and other top level metadata from the first document is used. Multiple documents should be combined before writing an assembly if required.

Note that there is a limit on the number of PDF and PS output operations depending on the amount of available memory. These are:

  • 32 bit platforms - 8 PDF or PS output operations at a time, subject to available memory
  • 64 bit platforms - 96 PDF or PS output operations at a time for most tool chains, subject to available memory
    • VS2015 Static builds are currently limited to 48

Member Enumeration Documentation

◆ eImageCompression

Enumeration for image compression formats.

Enumerator
eICDCT 

Jpeg.

eICRLE 

Run length encoding.

◆ ePdfAlternateImageHandling

Flags controlling PDF/X-4 and PDF/A-2 alternate image handling.
Allows control on what the PDF/X writer is allowed to invent, or what inconsistencies are considered safe to ignore.
For PDF/X-4, Alternate images are allowed, but no alternate image is allowed to specify that it is the default for printing (via the DefaultForPrinting key). By default, if an image with DefaultForPrinting set to true is present, then this image will be selected and the other alternate images shall be dropped.
For PDF/A-2b/u, Alternate images are not allowed at all. By default, we will apply the optional content rules for alternate images to select a single image as if the PDF was being printed.
Instead of this default, the following flags allow processing to stop in these situations.
Should an exception need to be raised, an IError with code EDL_ERR_INCOMPATIBLE_PDFX or EDL_ERR_INCOMPATIBLE_PDFA (depending on output version) will be thrown, where the error description will contain a short message outlining the problem that was encountered.

Enumerator
ePAIHDefault 

Default; see the comment above.

ePAIHFailIfAlternatesFound 

Throw an exception if an alternate image is encountered.

ePAIHFailIfDefaultForPrintingFound 

Throw an exception if an alternate image marked as default for printing is encountered.

◆ ePdfDeviceNHandling

Flags controlling PDF/X-4 and PDF/A-2 DeviceN handling.

Allows some control on what the PDF writer is allowed to invent, or what inconsistencies are considered safe to ignore.

Should an exception need to be raised, an IError with code EDL_ERR_INCOMPATIBLE_PDFX or EDL_ERR_INCOMPATIBLE_PDFA (depending on output version) will be thrown, where the error description will contain a short message outlining the problem that was encountered.

Enumerator
ePDNHDefault 

Default; make a best effort attempt to produce.

ePDNHFailOnMissingColorantInformation 

Throw an exception if a spot colorant has.

ePDNHFailOnInconsistentColorantInformation 

Throw an exception if inconsistent spot colorant.

ePDNHFailIfBetterColorantInformationFoundAfterFirstUse 

Throw an exception if better spot colorant.

ePDNHFailIfDotGainFound 

Throw an exception if a dotgain is encountered.

ePDNFailOnMismatchedDeviceNProcessSpace 

Throw an exception if a DeviceN Process Property does.

ePDNFailOnNonUtf8ColorantName 

Throw an exception if a DeviceN/Separation Colorant name is not valid UTF-8. Normal behaviour is to attempt to re-encode the names as UTF-8.

◆ ePdfExtendedGraphicsStateHandling

Flags controlling PDF/X-4 and PDF/A-2 Extended Graphics State information Allows some control on what the PDF writer is allowed to invent, or what inconsistencies are considered safe to ignore.

Should an exception need to be raised, an IError with code EDL_ERR_INCOMPATIBLE_PDFX or EDL_ERR_INCOMPATIBLE_PDFA (depending on output version) will be thrown, where the error description will contain a short message outlining the problem that was encountered.

Enumerator
ePEGSHDefault 

Default; make a best effort attempt to produce.

ePEGSHFailOnTransferFunction 

Throw an exception if a non-default transfer function is encountered.

◆ ePdfOptionalContentHandling

Flags controlling PDF/X-4 and PDF/A-2 Optional content.
Allows some control on what the PDF writer is allowed to invent, or what inconsistencies are considered safe to ignore.
Should an exception need to be raised, an IError with code EDL_ERR_INCOMPATIBLE_PDFX or EDL_ERR_INCOMPATIBLE_PDFA (depending on output version) will be thrown, where the error description will contain a short message outlining the problem that was encountered.

Enumerator
ePOCHDefault 

Default; make a best effort attempt to produce.

ePOCHFailOnInconsistentConfigurationName 

Throw an exception if an optional content configuration.

ePOCHFailOnInvalidOrder 

Throw if the Optional Content order information, if present.

ePOCHFailIfAutoStateFound 

Throw an exception if an optional content configuration contains.

◆ ePDFVersion

Supported versions.

Enumerator
ePDF1_3 

PDF 1.3.

ePDF1_4 

PDF 1.4.

ePDF1_5 

PDF 1.5.

ePDF1_6 

PDF 1.6.

ePDF1_7 

PDF 1.7.

ePDF2_0 

PDF 2.0 (EXPERIMENTAL)

ePDFA1b 

PDF/A-1b, based on PDF 1.4.

ePDFA2b 

PDF/A-2b, based on PDF 1.7.

ePDFA3b 

PDF/A-3b, based on PDF 1.7.

ePDFA2u 

PDF/A-2u, based on PDF 1.7.

ePDFUA 

PDF/UA, based on PDF/A-2u.

ePDFX1a 

PDF/X-1a:2003, based on PDF 1.4.

ePDFX4 

PDF/X-4, based on PDF 1.6.

Member Function Documentation

◆ create()

static JAWSMAKO_API IPDFOutputPtr JawsMako::IPDFOutput::create ( const IJawsMakoPtr & jawsMako,
const IProgressMonitorPtr & progressMonitor = IProgressMonitorPtr() )
static

Create a PDF Output instance.

Parameters
jawsMakoThe JawsMako instance.
progressMonitorThe progress monitor which allows aborting an operation or registering a progress callback.
Returns
IPDFOutputPtr The PDF Output instance

◆ overrideMaximumICCVersion()

virtual void JawsMako::IPDFOutput::overrideMaximumICCVersion ( uint32 majorVersion,
uint32 minorVersion )
pure virtual

Override the maximum allowed ICC profile version for PDF output.

Different PDF versions allow different ICC profile versions to be embedded. PDF/X-4 for example, by a strict reading of the specification, allows ICC Profiles of version 4.2 or earlier. However, some consumers will allow newer ICC Profiles to be used. This API allows the maximum ICC version to be overridden. Only do this if it is certain that the downstream consumers will be able to handle the setting.

The default value is 0,0 indicating that the maximum version for the current PDF output version will be used.

Equivalent to calling setParameter() with the parameter name OverrideMaximumICCVersionMajor and OverrideMaximumICCVersionMinor with the maximum major and minor version respectively.

    @param majorVersion An integer indicating the major version, e.g. 4 (for 4.x)
    @param minorVersion An integer indicating the minor version, e.g. 2 (for x.2)

◆ setAllowOptionalContentUpdateDuringWrite()

virtual void JawsMako::IPDFOutput::setAllowOptionalContentUpdateDuringWrite ( bool allow)
pure virtual

Allow updates to optional content to be made while the output is being written using an IOutputWriter.

If true, IOutputWriter::beginDocument() will not take a copy of the IOptionalContent associated with that document; instead it references the IOptionalContent. Additional groups may be added, and other edits may be made to the optional content object during the output operation. For example, it is possible to add optional content groups before a page that may use them. However for correct operation:

If false, normal behaviour occurs; the PDF output takes a copy of the IOptionalContent and any edits made during the output operation are not reflected in the output.

The default is false.

Equivalent to calling setParameter() with the parameter name "AllowOptionalContentUpdateDuringWrite" and the value "true" or "false".

If in any doubt, leave this set to false.

Parameters
allowThe required setting

◆ setAllowRestrictedFonts()

virtual void JawsMako::IPDFOutput::setAllowRestrictedFonts ( bool allowRestrictedFonts)
pure virtual

Allow restricted fonts to be embedded in the output.

If true, fonts that flag that they should not be embedded will be allowed to be embedded. If false, then such fonts will not be embedded.

Set this to true if you have sufficient permissions to do so.

Note that for PDF/X-4 and PDF/A-2b output, the output will instead fail if this setting is false and a restricted font is encountered.

The default is false.

Equivalent to calling setParameter() with the parameter name "AllowRestrictedFonts" and the value "true" or "false".

◆ setAlternateImageErrorHandling()

virtual void JawsMako::IPDFOutput::setAlternateImageErrorHandling ( uint32 flags)
pure virtual

Set flags controlling PDF/X-4 and PDF/A-2b alternate image handling See ePdfAlternateImageHandling# for details.

Equivalent to calling setParameter() with the parameter name "AlternateImageErrorHandling" and an unsigned integer string containing the flags value.

◆ setAlwaysEmbedFonts()

virtual void JawsMako::IPDFOutput::setAlwaysEmbedFonts ( CU8StringVect & fontNames)
pure virtual

Provide a list of name of fonts that should be always embedded, regardless of the settings for setEmbedFonts() or setEmbedBase14Fonts(). This setting is ignored for PDF/A.

Note that if incremental output is used, the content of unedited pages is not affected.

Equivalent to calling setParameter() with the parameter name "AlwaysEmbed" and a string with the fonts delimited with semicolons (backslashes are used as an escape character).

◆ setAutoRotatePages()

virtual void JawsMako::IPDFOutput::setAutoRotatePages ( bool autoRotate)
pure virtual

Set whether or not pages should be automatically rotated. The default is false.

Note that if incremental output is used, the content of unedited pages is not affected.

If true, pages are automatically rotated based on the prevalent text direction on the page. If incremental output is used, non-modified pages will not be subject to this setting. Equivalent to calling setParameter() with the parameter name "AutoRotatePages" with a boolean string ("true" or "false").

The rotation is not a physical rotation of content, merely the PDF Page's view rotate is set appropriately. So, in PDF viewers all annotations and page content will continue to appear correctly.

◆ setBlockNotdefGlyphs()

virtual void JawsMako::IPDFOutput::setBlockNotdefGlyphs ( bool blockNotdefGlyphs)
pure virtual

Set whether to block notdef glyphs from PDF output.

If true, notdef glyphs that are not-marking are dropped, and if a marking notdef character is encountered, an error is thrown. Also if true, the setting setEnableTrueTypeNotDef() is ignored.

The default is false.

Equivalent to calling setParameter() with the parameter name "BlockNotdefGlyphs" and the value "true" or "false".

◆ setColorImageMaxResolution()

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

Note that if incremental output is used, the content of unedited pages is not affected.

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.

◆ setCompressObjects()

virtual void JawsMako::IPDFOutput::setCompressObjects ( bool compressObjects)
pure virtual

Set whether or not to compress individual objects.

In addition to the compression of individual objects, setting this to true allows the creation of cross reference streams, which allow the generation of PDF files larger than 9999999999 (~9.3GB).

This setting is advisory only. In particular:

  • If performing incremental update, the cross reference format of the original PDF will be retained.
  • If writing to PDF 1.4 or earlier, object compression will not be used at all.

The default is true.

◆ setCompressPages()

virtual void JawsMako::IPDFOutput::setCompressPages ( bool compressPages)
pure virtual

Set whether or not compression should be applied to page content. The default is true.

Note that if incremental output is used, the content of unedited pages is not affected.

Equivalent to calling setParameter() with the parameter name "CompressPages" with a boolean string ("true" or "false").

◆ setConvertAllColors()

virtual void JawsMako::IPDFOutput::setConvertAllColors ( bool convert)
pure virtual

Set whether or not all content should be color converted to the target space set by setTargetColorSpace().

The default is false.

This parameter is ignored and assumed true when writing to PDF/A-1b or PDF/X-1a format output.

Note that if incremental output is used, the content of unedited pages is not color converted.

Equivalent to calling setParameter() with the param name "ConvertAllColors" with a boolean string ("true" or "false").

◆ setConvertGray()

virtual void JawsMako::IPDFOutput::setConvertGray ( bool convert)
pure virtual

Set whether or not gray colors should be subject to color conversion. That is, colors using DeviceGray, sGray, or single-component ICC colorspaces.

The default is true.

This parameter is ignored unless setConvertAllColors() is true.

For PDF/X output, this parameter only applies to objects using the DeviceGray color space. All other gray spaces are subject to the setting of setConvertAllColors().

Note that if incremental output is used, the content of unedited pages is not color converted.

Equivalent to calling setParameter() with the param name "ConvertGray" with a boolean string ("true" or "false").

◆ setDefaultFormCJKLanguage()

virtual void JawsMako::IPDFOutput::setDefaultFormCJKLanguage ( eFormCJKCharacterSet characterSet)
pure virtual

Set the default CJK character set for forms. Used when generating form appearance streams, and is only used when the character set cannot be determined from the content of the form. The default is Japanese.

Parameters
characterSetThe default CJK character set for forms

◆ setDeviceNErrorHandling()

virtual void JawsMako::IPDFOutput::setDeviceNErrorHandling ( uint32 flags)
pure virtual

Set flags controlling PDF/X-4 and PDF/A-2 DeviceN handling. See ePdfDeviceNHandling# for details.

Equivalent to calling setParameter() with the parameter name "DeviceNErrorHandling" and an unsigned integer string containing the flags value.

Ignored if the output version is anything other than PDF/A-2b or PDF/X-4.

◆ setDownsampleMaskedImages()

virtual void JawsMako::IPDFOutput::setDownsampleMaskedImages ( bool downsampleMaskedImages)
pure virtual

Set whether or not to downsample masked images.

This applies to cases where an image is masked by a separate masked image, such as types of PDF masked or soft-masked images. These are represented in the DOM using IDOMMaskedBrush, where the sub-brush is an image.

Has no effect if downsampling is not enabled

The default is true.

Equivalent to calling setParameter() with the param names "DownsampleMaskedImages" with the values "true" or "false".

◆ setEmbedBase14Fonts()

virtual void JawsMako::IPDFOutput::setEmbedBase14Fonts ( bool embed)
pure virtual

Set whether the base 14 PDF fonts should be forcibly embedded. If true, this overrides the embedding settings in IDOMFontOpenType. Only the standard 14 fonts are not affected by this; use setEmbedFonts() to affect other fonts.

Note that if incremental output is used, the content of unedited pages is not affected.

The default is false. This setting is ignored for PDF/A and PDF/X where it is forced to true.

Equivalent to calling setParameter() with the parameter name "EmbedBase14Fonts" with a boolean string ("true" or "false").

◆ setEmbedFonts()

virtual void JawsMako::IPDFOutput::setEmbedFonts ( bool embed)
pure virtual

Set whether fonts should be forcibly embedded. If true, this overrides the embedding settings in each IDOMFontOpenType. The standard 14 fonts are not affected by this; use setEmbedBaseFonts() instead.

Note that if incremental output is used, the content of unedited pages is not affected.

The default is false. This setting is ignored for PDF/A and PDF/X where it is forced to true.

Equivalent to calling setParameter() with the parameter name "EmbedFonts" with a boolean string ("true" or "false").

◆ setEmbedIdentityCidFonts()

virtual void JawsMako::IPDFOutput::setEmbedIdentityCidFonts ( bool embed)
pure virtual

Set whether or not Identity CIDFonts should be embedded.

If true, CIDFonts that would need to be represented in the PDF as Identity CID fonts are always embedded unless the font is restricted and setAllowRestrictedFonts() has been set to false.

The reason for this is that it is generally unsafe to not embed such fonts. These fonts select a glyph in a font directly by its glyph ID, and as such, if the font that is substituted by a consuming application is not the same, then the correct glyphs may not be selected; the result will be whatever glyphs the substitute font happens to have present in the used glyph slots.

It is for this reason that the default is true.

If false, the other font embedding settings will apply to fonts of this type. For safety, if using PDF input, IPDFInput::setImproveGlyphSelectionForUnembeddedIdentityFonts(false) should be used to preserve the original glyph indexes from input cases.

Equivalent to calling setParameter() with the parameter name "EmbedIdentityCidFonts" and the value "true" or "false".

◆ setEmit30CmapSubtableForSymbolicTrueTypeFonts()

virtual void JawsMako::IPDFOutput::setEmit30CmapSubtableForSymbolicTrueTypeFonts ( bool emit)
pure virtual

Set whether to add a 3,0 ("Windows") 'cmap' subtable to symbolic TrueType fonts in PDF output.

If true, a 3,0 cmap subtable will be emitted alongside a 1,0 format subtable for symbolic TrueType fonts. If false, only the 1,0 subtable will be emitted.

This setting is ignored for PDF/A and PDF/X.

The default is true.

Such subtables are required for compatibility with some PDF consumers, and are well tolerated by most PDF consumers. However some preflight tools may emit errors. This can be set false to afford compatibility with such tools.

If unsure, please contact Mako support.

Equivalent to calling setParameter() with the parameter name "Emit30CmapSubtableForSymbolicTrueTypeFonts" and the value "true" or "false".

◆ setEnableIncrementalOutput()

virtual void JawsMako::IPDFOutput::setEnableIncrementalOutput ( bool enable = true)
pure virtual

Set whether or not incremental output should be enabled.

The default is false (that is, a full save is performed). Incremental output is only possible when all of the following are true:

  • writeAssembly() is used (rather than the IOutputWriter interface,
  • The assembly has only one document,
  • The assembly was opened from a PDF, and
  • The PDF was either a file or opened from a random-access stream.
  • The PDF version specified is the same version or higher than the input PDF.
  • The output is not to be linearized.

If all are true, only modified content is written and appended to the output (actually the source PDF is copied, and then the new content is appended to the copied PDF). This is usually much faster than a full save when the assembly has only been lightly modified. Note that the original PDF will be recoverable and so this should not be used when redacting for example.

Otherwise, a regular full save is performed.

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

For PDF/X and PDF/A, this setting is ignored.

◆ setEnableTrueTypeNotDef()

virtual void JawsMako::IPDFOutput::setEnableTrueTypeNotDef ( bool enableTrueTypeNotDef)
pure virtual

Enable the use of a True Type font's /.notdef glyph in the output.

If true, a character that does not have a glyph or that has been linked to the /.notdef glyph will be replaced by the /.notdef glyph.

If false, a character that does not have a glyph or that has been linked to the /.notdef glyph will be ignored.

Note that for PDF/X-4 and PDF/A-2b output, the flag is set to true anyway. This flag is also ignored if setBlockNotdefGlyphs() is set true.

The default is true.

Equivalent to calling setParameter() with the parameter name "EnableTrueTypeNotDef" and the value "true" or "false".

◆ setEncryption()

virtual void JawsMako::IPDFOutput::setEncryption ( uint32 keyLength,
uint32 permissions,
bool encryptMetadata = false,
const U8String & ownerPassword = "",
const U8String & userPassword = "" )
pure virtual

Set the encryption for the output PDF. The default is no encryption.

Please note:

  • Setting a key length of zero disables encryption.
  • If encryption is enabled, the encryption algorithm will be chosen based on the output PDF version. Not all key lengths are available for all versions, and an exception will be thrown if an unavailable key length is chosen.
  • If encryption is enabled, at least one password must be supplied. If only a user password is supplied, it will also be used for the owner password.
  • Permissions are only used if encryption is enabled. That is, permissions information is only stored if the PDF is to be encrypted.
  • If 40 bit encryption is used, then encryptMetadata must be true, or an exception will result.
  • Some permissions flags are ignored for 40 bit key lengths. For 40 bit output, eFillFormAllowed, eExtractionAllowed, eAssemblyAllowed and eHighQualityPrintAllowed are ignored.
  • If encryption is enabled, incremental output is disabled.

Equivalent to calling setParameter with the parameter names "KeyLength", "Permissions", "EncryptMetadata", "OwnerPassword" and "UserPassword".

For PDF/A and PDF/X, encryption is not allowed and an exception will be thrown if output is attempted with Encryption enabled.

Parameters
keyLengthThe key length to use. Must be 0, 40, 128 or 256. 0 indicates that encryption will not be performed.
permissionsThe permissions bit mask for the output PDF. (see IDOMStandardPDFSecurityInfo::ePermissionsFlags).
encryptMetadataWhether or not to encrypt metadata. The default is false. Must be set to true if a 40 bit key length is specified.
ownerPasswordThe owner password to use.
userPasswordThe user password to use.

◆ setExtendedGraphicsStateErrorHandling()

virtual void JawsMako::IPDFOutput::setExtendedGraphicsStateErrorHandling ( uint32 flags)
pure virtual

Set flags controlling PDF/X-4 and PDF/A-2 Extended Graphics State handling. See ePdfExtendedGraphicsStateHandling# for details.

Equivalent to calling setParameter() with the parameter name "ExtendedGraphicsStateErrorHandling" and an unsigned integer string containing the flags value.

◆ setForceEmitPageGroup()

virtual void JawsMako::IPDFOutput::setForceEmitPageGroup ( bool force)
pure virtual

Set whether or not the page group should be forcibly written.

If false, the page group will only be written if the PDF output module detects transparent content on the page. Set this to true to emit the page group (if present) regardless of whether the page contains transparency or not.

The default, is true.

This setting is ignored when writing PDF versions that do not support transparency, where the page group will never be written.

Equivalent to calling setParameter() with the parameter name "ForceEmitPageGroup" and the value "true" or "false".

◆ setForceMediaBoxOriginZero()

virtual void JawsMako::IPDFOutput::setForceMediaBoxOriginZero ( bool force)
pure virtual

Set whether or not the media box origin should be set to 0,0 in the output.

Only applies to pages whose content needs to be written. That is, if incremental output is used, this setting only applies to pages that are edited, or new pages.

The default is false.

Equivalent to calling setParameter() with the parameter name "ForceMediaBoxOriginZero" and the value "true" or "false".

◆ setGrayImageMaxResolution()

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

Note that if incremental output is used, the content of unedited pages is not affected.

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.

◆ setJPEGChromaSubsampling()

virtual void JawsMako::IPDFOutput::setJPEGChromaSubsampling ( bool subsample)
pure virtual

Set whether or not to use chroma subsampling when compressing color images in DCT/JPEG format. Chroma subsampling improves compression by reducing the resolution of color information in the image, leaving luminance information at high resolution.

For natural images, this results in smaller output file size, but usually with very little perceived quality difference.

However, for non-natural images, which usually compress poorly using DCT/JPEG, chroma subsampling can result in worse perceived quality in areas where color changes rapidly, such as around text.

Note that using setJPEGQuality() will override this setting. Be sure to set the JPEG quality first before setting this parameter.

Equivalent to calling setParameter() with the parameter name "JPEGChromaSubsampling" and the value being "true" or "false".

As the default JPEG quality is 5, the default chroma subsampling is false.

Parameters
subsampleWhether or not to apply chroma subsampling when compressing a color image using DCT.

◆ setJPEGQuality()

virtual void JawsMako::IPDFOutput::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 5 - highest quality.

For quality levels 4 and 5, chroma subsampling is turned off. For quality levels 1 through 3, chroma subsampling is turned on. However this can be overridden by subsequently using setJPEGChromaSubsampling() to explicitly control chroma subsampling.

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

◆ setLinearize()

virtual void JawsMako::IPDFOutput::setLinearize ( bool linearize = true)
pure virtual

Set whether or not the output should be linearized.

The default is false. When true a PDF optimised for byte serving (for example from a web server) will be produced. This will generally be a slow operation. If linearized, a PDF cannot be written incrementally and the setting of setEnableIncrementalOutput() will be ignored.

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

◆ setMonoImageMaxResolution()

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

Note that if incremental output is used, the content of unedited pages is not affected.

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.

◆ setNeverEmbedFonts()

virtual void JawsMako::IPDFOutput::setNeverEmbedFonts ( CU8StringVect & fontNames)
pure virtual

Provide a list of name of fonts that should never be embedded, regardless of the settings for setEmbedFonts() or setEmbedBase14Fonts(). This setting is ignored for PDF/A.

Equivalent to calling setParameter() with the parameter name "NeverEmbed" and a string with the fonts delimited with semicolons (backslashes are used as an escape character).

◆ setNonUtf8InkNameFallbackEncoding()

virtual void JawsMako::IPDFOutput::setNonUtf8InkNameFallbackEncoding ( eInkFallbackEncoding fallbackEncoding)
pure virtual

Set the fallback encoding to use when attempting to decode non-UTF8 compatible ink names for PDF/A-2 and PDF/X-4 output. Only consulted when ePDNFailOnNonUtf8ColorantName is unset in setDeviceNErrorHandling. See the two-parameter method of inkNameToString for how this is done.

Equivalent to calling setParameter() with the parameter name "NonUtf8InkNameFallbackEncoding" and the eInkFallbackEncoding enumeration name, with the "eIFE" prefix removed. For example: setParameter("NonUtf8InkNameFallbackEncoding", "ShiftJIS");

◆ setOptionalContentErrorHandling()

virtual void JawsMako::IPDFOutput::setOptionalContentErrorHandling ( uint32 flags)
pure virtual

Set flags controlling PDF/X-4 and PDF/A-2 Optional Content handling. See ePdfOptionalContentHandling# for details.

Equivalent to calling setParameter() with the parameter name "OptionalContentErrorHandling" and an unsigned integer string containing the flags value.

◆ setOutputIntent()

virtual void JawsMako::IPDFOutput::setOutputIntent ( const IOutputIntentPtr & outputIntent)
pure virtual

Set an explicit output intent, or NULL to clear it.

Note: This is only currently honoured for PDF/X-4 and PDF/A-2b output. Please note that as a result of this, PDF 2.0 features are ignored.

Note: This is only currently honoured for the following output versions:

  • PDF/X-4
  • PDF/A-2b
  • PDF/A-2u
  • PDF/A-3b
  • PDF/UA Please note that as a result of this, PDF 2.0 features are ignored.

For PDF/A-2b and up, setting a NULL output intent causes no output intent to be emitted.

◆ setOutputIntents()

virtual void JawsMako::IPDFOutput::setOutputIntents ( const COutputIntentVect & outputIntents)
pure virtual

Set a vector of output intents, or an empty vector to clear them.

Note: This is only currently honoured for the following output versions:

  • PDF/X-4
  • PDF/A-2b
  • PDF/A-2u
  • PDF/A-3b
  • PDF/UA Please note that as a result of this, PDF 2.0 features are ignored.

There are restrictions placed on the content of these output intents:

  • If writing to PDF/X-4, there must be one (and only one) output intent with the Subtype of GTS_PDFX. For Mako, this output intent must specify a profile.
  • If writing to PDF/A (or variants), there must be one (and only one) output intent with the Subtype GTS_PDFA1. For Mako, this output intent must specify a profile. Further, any output intent that provides a profile must point to the same profile.

The intent associated with the output format will be used to direct the process of conforming the content to the required PDF standard.

For PDF/A-2 and up, setting an empty vector causes no output intent to be emitted.

For best compatibility with downstream consumers, set the first intent to be the primary intent for the output format being targeted. For example, for PDF/X, the intent with GTS_PDFX should be the first intent.

◆ setPreferredColorImageCompression()

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

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

CCITT is not allowed for color images.

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

Note also that if incremental output is used, the content of unedited pages is not affected. For example, PDF/A does not allow LZW.

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

Parameters
compressionThe desired compression.

◆ setPreferredGrayImageCompression()

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

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

CCITT is not allowed for gray images.

Note: this is advisory only and may not be honoured in all cases. For example, PDF/A does not allow LZW.

Note also that if incremental output is used, the content of unedited pages is not affected.

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

Parameters
compressionThe desired compression.

◆ setPreferredMonoImageCompression()

virtual void JawsMako::IPDFOutput::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, and auto will be set to CCITT.

Note: this is advisory only and may not be honoured in all cases. For example, PDF/A does not allow LZW.

Note also that if incremental output is used, the content of unedited pages is not affected.

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

Parameters
compressionThe desired compression.

◆ setPreferredRenderedImageCompression()

virtual void JawsMako::IPDFOutput::setPreferredRenderedImageCompression ( eImageCompression compression)
pure virtual

Set the desired image compression for images that are the result of rendering. The default is eICFlate. If set to auto, flate will be used.

Note: this is advisory only and may not be honoured in all cases. For example, PDF/A does not allow LZW.

Note also that if incremental output is used, the content of unedited pages is not affected.

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

Parameters
compressionThe desired compression.

◆ setProducer()

virtual void JawsMako::IPDFOutput::setProducer ( const U8String & producer)
pure virtual

Set the Producer name for the output PDF.

Equivalent to calling setParameter with the parameter name "Producer" with the value as a string.

The default is "Mako VX.X.X"

Note that this will also be used for the PDF's Creator if the metadata for the document being written does not specify a Creator.

If an empty string is provided, the default will be used.

◆ setPublicKeyEncryption()

virtual void JawsMako::IPDFOutput::setPublicKeyEncryption ( uint32 keyLength,
const CEDLVector< CPDFRecipientsInfo > & recipients,
bool encryptMetadata = false )
pure virtual

Use certificate/public-key encryption for the output PDF. The default is no encryption.

Please note:

  • Only AES based encryption is supported.
  • If encryption is enabled, incremental output is disabled.

Note: Public key encryption is only supported on Linux and Windows (non-UWP) platforms at this time. Linux platforms will make use of AES encryption for the CMS objects embedded in the PDF, while on Windows Triple DES (3DES) is used. The body of the PDF document however is always encrypted using AES.

For PDF/A and PDF/X, encryption is not allowed and an exception will be thrown if output is attempted with Encryption enabled.

Public key encryption requires at least PDF 1.5. Take care if producing PDF prior to PDF 1.7 using 256 bit encryption.

Parameters
keyLengthThe key length to use. Must be 0, 128 or 256. 0 indicates that encryption will not be performed.
recipientsA vector of CPDFRecipients objects for all users who will be allowed to access the resulting document. Pass an empty array to disable encryption.
encryptMetadataWhether or not to encrypt metadata. The default is false.

◆ setReencodeImages()

virtual void JawsMako::IPDFOutput::setReencodeImages ( bool reencode)
pure virtual

Set whether images should be reencoded.

PDF Output will attempt to embed images in the output PDF as is, if possible. To force recompression, set to true.

The default is false.

Equivalent to calling setParameter() with the parameter name "ReencodeImages" with "true" or "false".

Note that if incremental output is used, the content of unedited pages is not affected.

◆ setRenderResolution()

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

Set the resolution to use if page content requires rendering in order to be output. The default is 300dpi. 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.

◆ setRetainClippedContent()

virtual void JawsMako::IPDFOutput::setRetainClippedContent ( bool retainClippedContent)
pure virtual

Allow clipped out content to be retained in the output.

If false, gross clipping will be performed on any object whose bounds falls completely out of the clipping path, and the object will be dropped from the output.

The default is true.

Equivalent to calling setParameter() with the parameter name "RetainClippedContent" and the value "true" or "false".

Parameters
retainClippedContentThe required setting

◆ setRetainEmbeddedFiles()

virtual void JawsMako::IPDFOutput::setRetainEmbeddedFiles ( bool retainEmbeddedFiles)
pure virtual

Allow embedded files to be retained in PDF/A and PDF/X-4 output.

Applies only to PDF/A and PDF/X-4. If true, any embedded files will be retained in the output. If false embedded files will be dropped.

The default is false.

Equivalent to calling setParameter() with the parameter name "RetainEmbeddedFiles" and the value "true" or "false".

Parameters
retainEmbeddedFilesThe required setting

◆ setSubsetFonts()

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

Set whether embedded fonts should be subset or not. The default is true.

This is a preference only. Some font types may require subsetting based on context.

Note that if incremental output is used, the content of unedited pages is not affected.

Equivalent to calling setParameter() with the parameter name "SubsetFonts" with a boolean string ("true" or "false").

◆ setTargetColorSpace()

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

Set the target color space for the output.

The default is DeviceRGB.

By default, the target color space is used if anything must be rendered or color-converted. The default behaviour is to apply this only when required. Use convertAllColors() if converting everything is required.

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

For PDF/A-1b output, an OutputIntents dictionary will be created for this color space. LAB color spaces may not be used as a destination color space for PDF/A.

For PDF/X-1a output, only DeviceCMYK is supported; this setting is ignored. If you wish to change the profile to be used, please set the DeviceCMYK intercept in the color manager to your desired profile (see IColorManager::setDeviceCMYKIntercept()). As for PDF/A-1b an OutputIntents dictionary will be created.

For PDF/X-4 and PDF/A-2b output, an OutputIntents dictionary will be created for this color space. LAB color spaces may not be used as a destination color space for PDF/X-4 or PDF/A-2. Please note that content using a device space with the same number of components as the output intent will be assumed to be compatible with this space. For example, if a CMYK ICCBased color space is used for the target space, then any DeviceCMYK content will remain as DeviceCMYK in the output even if the current DeviceCMYK intercept is set to some other profile. Note also that if the output intent is a CMYK color space, then DeviceGray similarly will also be considered equivalent to the K channel of the output intent.

Additionally for PDF/A-2b output, it is possible to set a NULL output intent, in which case no OutputIntent will be produced.

Parameters
targetSpaceThe desired color space. Must be a simple or ICC space. scRGB is not supported for output.

◆ setTargetProfile()

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

Set the target color space for the output using an ICC profile.

By default, the target color space is used if anything must be rendered or color-converted. The default behaviour is to apply this only when required. Use convertAllColors() if converting everything is required.

Equivalent to calling setParameter() with the param name "TargetProfile" with the value as the path to the profile.

For PDF/A-1b, PDF/X-1a and PDF/X-4 output, the restrictions described in setTargetColorSpace() above apply.

Parameters
profileThe desired profile.

◆ setUseMaskResolutionForMaskedImages()

virtual void JawsMako::IPDFOutput::setUseMaskResolutionForMaskedImages ( bool useMaskResolutionSettingForMaskedImages)
pure virtual

Set whether or not the mask resolution setting should be applied to the image portion of a masked image.

This applies to cases where an image is masked by a separate masked image, such as types of PDF masked or soft-masked images. These are represented in the DOM using IDOMMaskedBrush, where the sub-brush is an image.

If false, then the mask and the image are evaluated separately and a downsampling resolution and threshold are chosen. For the mask, this is normally either grayscale or monochrome. The image data can be anything. In this mode it is possible for the downsampled image and mask to be downsampled to different resolutions.

If true, then whatever target resolution and threshold is applied to the mask will also be applied to the image samples. If these images have the same effective resolution before downsampling, then they will also share the same effective resolution after downsampling.

Has no effect if downsampling is not enabled

The default is true.

Equivalent to calling setParameter() with the param names "UseMaskResolutionForMaskedImages" with the values "true" or "false".

◆ setValidateXmp()

virtual void JawsMako::IPDFOutput::setValidateXmp ( bool validate)
pure virtual

Validate XMP metadata.

If true, any XMP properties that do not use the predefined schemas defined in the XMP Specification will be dropped, or if false will be written to the output.

The default is true.

Note that using non-predefined schemas may produce non-conformant output when writing to PDF/X or PDF/A, and it is advised to leave this set to true when writing to PDF/X or PDF/A.

Equivalent to calling setParameter() with the parameter name "ValidateXmp" and the value "true" or "false".

    @param validate Validate the XMP.

◆ setVersion()

virtual void JawsMako::IPDFOutput::setVersion ( ePDFVersion version)
pure virtual

Set the PDF version to generate.

Valid versions supported by this release are:

  • 1.3
  • 1.4
  • 1.5
  • 1.6
  • 1.7
  • PDF/A-1b
  • PDF/A-2b
  • PDF/A-2u
  • PDF/A-3b
  • PDF/UA
  • PDF/X-1a
  • PDF/X-2b
  • PDF/X-4

Equivalent to calling setParameter with the parameter name "PDFVersion" with the value of the version as a string (i.e. "1.3", "1.7", "PDF/A-1b", "PDF/X-1a"). The default is 1.7. Some features in the content being written may be dropped.

For PDF 1.3 it is recommended that the "PDF1.3" preset be used. This will ensure correct-looking results on diverse consumers with different color management schemes, and will also set the version to 1.3.

Note that for PDF/UA, setting this version only writes the necessary conformance information to the XMP metadata and applies the usual PDF/A-2U processing. This will not automatically result in a conformant or useful PDF. In order for the document to be useful and conformant, all content in the PDF must be appropriately tagged. See the pdfuacreation simple example for an example of how this may be done.

Parameters
versionVersion string

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