Mako 7.3.0 API
JawsMako::IPDFInput Class Referenceabstract

An instance of the JawsMako PDF input class. More...

#include <pdfinput.h>

Inheritance diagram for JawsMako::IPDFInput:

Classes

class  CPdfFontInfo
 Information about a font in a PDF file, obtained by scanning the PDF font structures. More...
 
class  CPdfScannedInk
 Basic information about an ink used in a PDF file, obtained by scanning the PDF page tree. More...
 

Public Member Functions

virtual void setPassword (const U8String &password)=0
 Set the password that should be used when attempting to open PDF files. For password encrypted PDF, this is the user or owner password. For PDF files encrypted with public key cryptography, this is the password to be used to extract the private key from the PKCS12/PFX container. The default is no password. More...
 
virtual void setPkcs12 (const IRAInputStreamPtr &pkcs12)=0
 Set the stream containing the PKCS12/PFX data containing the private key used to decrypt the PDF when public key encryption is used. More...
 
virtual void setFailOnFontFallback (bool failOnFontFallback)=0
 Set whether or not to fail when a font cannot be found and PDF input needs to use a fallback font or create and emulated font. More...
 
virtual void setDefaultRenderingIntent (eRenderingIntent intent)=0
 Override the default rendering intent in the PDF. More...
 
virtual CPdfFontInfoVect scanPdfForFonts (const U8String &pathToFile, const IProgressMonitorPtr &progressMonitor, bool domFont=false)=0
 Quickly scan the PDF file at the given UTF-8 path for fonts. Does not attempt to validate the fonts, nor use them in any way. Instead, the PDF page tree is scanned and the PDF font objects interrogated. Annotations are scanned also. More...
 
virtual CPdfFontInfoVect scanPdfForFonts (const String &pathToFile, const IProgressMonitorPtr &progressMonitor, bool domFont=false)=0
 Quickly scan the PDF file at the given wide-character Unicode path for fonts. Does not attempt to validate the fonts, nor use them in any way. Instead, the PDF page tree is scanned and the PDF font objects interrogated. Annotations are scanned also. More...
 
virtual CPdfFontInfoVect scanPdfForFonts (const IInputStreamPtr &pdfStream, const IProgressMonitorPtr &progressMonitor, bool domFont=false)=0
 Quickly scan the PDF file in the given stream for fonts. Does not attempt to validate the fonts, nor use them in any way. Instead, the PDF page tree is scanned and the PDF font objects interrogated. Annotations are scanned also. More...
 
virtual CPdfScannedInkVect scanPdfForInks (const U8String &pathToFile, const IProgressMonitorPtr &progressMonitor, uint32 startPageIndex=0, uint32 endPageIndex=0)=0
 Quickly scan the PDF file at the given UTF-8 path and find any mentions of inks in color spaces. More...
 
virtual CPdfScannedInkVect scanPdfForInks (const String &pathToFile, const IProgressMonitorPtr &progressMonitor, uint32 startPageIndex=0, uint32 endPageIndex=0)=0
 Quickly scan the PDF file at the given wide character path and find any mentions of inks in color spaces. More...
 
virtual CPdfScannedInkVect scanPdfForInks (const IInputStreamPtr &pdfStream, const IProgressMonitorPtr &progressMonitor, uint32 startPageIndex=0, uint32 endPageIndex=0)=0
 Quickly scan the given PDF stream and find any mentions of inks in color spaces. More...
 
virtual uint32 getNumIncrementalSaves (const U8String &pathToFile)=0
 Find the number of incremental saves in the given PDF stream. More...
 
virtual uint32 getNumIncrementalSaves (const String &pathToFile)=0
 Find the number of incremental saves in the given PDF stream. More...
 
virtual uint32 getNumIncrementalSaves (const IInputStreamPtr &pdfStream)=0
 Find the number of incremental saves in the given PDF stream. More...
 
virtual IDocumentAssemblyPtr openIncremental (const U8String &pathToFile, uint32 incrementalIndex)=0
 Open an incremental PDF stream, returning the IDocumentAssembly representing the contents. More...
 
virtual IDocumentAssemblyPtr openIncremental (const String &pathToFile, uint32 incrementalIndex)=0
 Open an incremental PDF stream, returning the IDocumentAssembly representing the contents. More...
 
virtual IDocumentAssemblyPtr openIncremental (const IInputStreamPtr &pdfStream, uint32 incrementalIndex)=0
 Open an incremental PDF stream, returning the IDocumentAssembly representing the contents. More...
 
virtual CIRAInputStreamVect getIncrementalSaves (const U8String &pathToFile)=0
 Find the number of incremental saves in the given PDF stream, returning a vector of streams. More...
 
virtual CIRAInputStreamVect getIncrementalSaves (const String &pathToFile)=0
 Find the number of incremental saves in the given PDF stream, returning a vector of streams. More...
 
virtual CIRAInputStreamVect getIncrementalSaves (const IInputStreamPtr &pdfStream)=0
 Find the number of incremental saves in the given PDF stream, returning a vector of streams. More...
 
- Public Member Functions inherited from JawsMako::IInput
virtual IDocumentAssemblyPtr open (const U8String &pathToFile)=0
 Open a file on disk, returning the IDocumentAssembly representing the contents. More...
 
virtual IDocumentAssemblyPtr open (const String &pathToFile)=0
 Open a file on disk, returning the IDocumentAssembly representing the contents. Takes a wide character string. More...
 
virtual IDocumentAssemblyPtr open (const IInputStreamPtr &inputStream)=0
 Open a stream, returning the IDocumentAssembly representing the contents. More...
 
virtual void setSequentialMode (bool sequential)=0
 Set/unset sequential mode on this input. More...
 
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. 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 IPDFInputPtr create (const IJawsMakoPtr &jawsMako, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr())
 Create an input for reading source documents in PDF format. More...
 
- Static Public Member Functions inherited from JawsMako::IInput
static JAWSMAKO_API IInputPtr create (const IJawsMakoPtr &jawsMako, eFileFormat format, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr())
 Create an input for reading source documents in the given format. The following formats are currently supported: More...
 

Additional Inherited Members

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

Detailed Description

An instance of the JawsMako PDF input class.

Member Function Documentation

◆ create()

static JAWSMAKO_API IPDFInputPtr JawsMako::IPDFInput::create ( const IJawsMakoPtr &  jawsMako,
const IProgressMonitorPtr &  progressMonitor = IProgressMonitorPtr() 
)
static

Create an input for reading source documents in PDF format.

Parameters
jawsMakoThe IJawsMako object
progressMonitorA smart pointer to an IProgressMonitor object which can be NULL if no such object was passed in.
Returns
IPDFInputPtr the PDF input

◆ getIncrementalSaves() [1/3]

virtual CIRAInputStreamVect JawsMako::IPDFInput::getIncrementalSaves ( const IInputStreamPtr &  pdfStream)
pure virtual

Find the number of incremental saves in the given PDF stream, returning a vector of streams.

Parameters
pdfStreamThe input PDF stream.
Returns
CIRAInputStreamVect A vector of incremental PDF streams, which will be zero length for PDF files saved without incremental update. Returned streams are not copied from the input, but are created from the input with createSubFile() and offset to the end of each incremental save.

◆ getIncrementalSaves() [2/3]

virtual CIRAInputStreamVect JawsMako::IPDFInput::getIncrementalSaves ( const String pathToFile)
pure virtual

Find the number of incremental saves in the given PDF stream, returning a vector of streams.

Parameters
pathToFileThe path to the input file.
Returns
CIRAInputStreamVect A vector of incremental PDF streams, which will be zero length for PDF files saved without incremental update. Returned streams are not copied from the input, but are created from the input with createSubFile() and offset to the end of each incremental save.

◆ getIncrementalSaves() [3/3]

virtual CIRAInputStreamVect JawsMako::IPDFInput::getIncrementalSaves ( const U8String pathToFile)
pure virtual

Find the number of incremental saves in the given PDF stream, returning a vector of streams.

Parameters
pathToFileThe path to the input file.
Returns
CIRAInputStreamVect A vector of incremental PDF streams, which will be zero length for PDF files saved without incremental update. Returned streams are not copied from the input, but are created from the input with createSubFile() and offset to the end of each incremental save.

◆ getNumIncrementalSaves() [1/3]

virtual uint32 JawsMako::IPDFInput::getNumIncrementalSaves ( const IInputStreamPtr &  pdfStream)
pure virtual

Find the number of incremental saves in the given PDF stream.

Parameters
pdfStreamThe input PDF stream.
Returns
uint32 The number of incremental saves in the PDF stream. Returns a value of zero for PDF files saved without incremental update.

◆ getNumIncrementalSaves() [2/3]

virtual uint32 JawsMako::IPDFInput::getNumIncrementalSaves ( const String pathToFile)
pure virtual

Find the number of incremental saves in the given PDF stream.

Parameters
pathToFileThe path to the input file.
Returns
uint32 The number of incremental saves in the PDF stream. Returns a value of zero for PDF files saved without incremental update.

◆ getNumIncrementalSaves() [3/3]

virtual uint32 JawsMako::IPDFInput::getNumIncrementalSaves ( const U8String pathToFile)
pure virtual

Find the number of incremental saves in the given PDF stream.

Parameters
pathToFileThe path to the input file.
Returns
uint32 The number of incremental saves in the PDF stream. Returns a value of zero for PDF files saved without incremental update.

◆ openIncremental() [1/3]

virtual IDocumentAssemblyPtr JawsMako::IPDFInput::openIncremental ( const IInputStreamPtr &  pdfStream,
uint32  incrementalIndex 
)
pure virtual

Open an incremental PDF stream, returning the IDocumentAssembly representing the contents.

Parameters
pdfStreamThe input PDF stream.
incrementalUpdateIndexThe incremental update to load, with valid values being in the range 0 to getNumIncrementalSaves().
Returns
IDocumentAssemblyPtr The document assembly.

◆ openIncremental() [2/3]

virtual IDocumentAssemblyPtr JawsMako::IPDFInput::openIncremental ( const String pathToFile,
uint32  incrementalIndex 
)
pure virtual

Open an incremental PDF stream, returning the IDocumentAssembly representing the contents.

Parameters
pathToFileThe path to the input file.
incrementalUpdateIndexThe incremental update to load, with valid values being in the range 0 to getNumIncrementalSaves().
Returns
IDocumentAssemblyPtr The document assembly.

◆ openIncremental() [3/3]

virtual IDocumentAssemblyPtr JawsMako::IPDFInput::openIncremental ( const U8String pathToFile,
uint32  incrementalIndex 
)
pure virtual

Open an incremental PDF stream, returning the IDocumentAssembly representing the contents.

Parameters
pathToFileThe path to the input file.
incrementalUpdateIndexThe incremental update to load, with valid values being in the range 0 to getNumIncrementalSaves().
Returns
IDocumentAssemblyPtr The document assembly.

◆ scanPdfForFonts() [1/3]

virtual CPdfFontInfoVect JawsMako::IPDFInput::scanPdfForFonts ( const IInputStreamPtr &  pdfStream,
const IProgressMonitorPtr &  progressMonitor,
bool  domFont = false 
)
pure virtual

Quickly scan the PDF file in the given stream for fonts. Does not attempt to validate the fonts, nor use them in any way. Instead, the PDF page tree is scanned and the PDF font objects interrogated. Annotations are scanned also.

You can pass in an optional callback function to receive progress information. From this function, execution may be aborted by throwing an abort exception using throwEDLError(EDL_ERR_ABORTED) which will propagate back to the caller.

When the optional domFont parameter is set to true, scanPdfFonts() will generate a IDOMFont from any found PDF font object.

Note: Even if a font is embedded, a given PDF consumer may decide not to use it and instead use a substitute, for example if the font is invalid or broken.

◆ scanPdfForFonts() [2/3]

virtual CPdfFontInfoVect JawsMako::IPDFInput::scanPdfForFonts ( const String pathToFile,
const IProgressMonitorPtr &  progressMonitor,
bool  domFont = false 
)
pure virtual

Quickly scan the PDF file at the given wide-character Unicode path for fonts. Does not attempt to validate the fonts, nor use them in any way. Instead, the PDF page tree is scanned and the PDF font objects interrogated. Annotations are scanned also.

You can pass in an optional callback function to receive progress information. From this function, execution may be aborted by throwing an abort exception using throwEDLError(EDL_ERR_ABORTED) which will propagate back to the caller.

When the optional domFont parameter is set to true, scanPdfFonts() will generate a IDOMFont from any found PDF font object.

Note: Even if a font is embedded, a given PDF consumer may decide not to use it and instead use a substitute, for example if the font is invalid or broken.

◆ scanPdfForFonts() [3/3]

virtual CPdfFontInfoVect JawsMako::IPDFInput::scanPdfForFonts ( const U8String pathToFile,
const IProgressMonitorPtr &  progressMonitor,
bool  domFont = false 
)
pure virtual

Quickly scan the PDF file at the given UTF-8 path for fonts. Does not attempt to validate the fonts, nor use them in any way. Instead, the PDF page tree is scanned and the PDF font objects interrogated. Annotations are scanned also.

You can pass in an optional callback function to receive progress information. From this function, execution may be aborted by throwing an abort exception using throwEDLError(EDL_ERR_ABORTED) which will propagate back to the caller.

When the optional domFont parameter is set to true, scanPdfFonts() will generate a IDOMFont from any found PDF font object.

Note: Even if a font is embedded, a given PDF consumer may decide not to use it and instead use a substitute, for example if the font is invalid or broken.

◆ scanPdfForInks() [1/3]

virtual CPdfScannedInkVect JawsMako::IPDFInput::scanPdfForInks ( const IInputStreamPtr &  pdfStream,
const IProgressMonitorPtr &  progressMonitor,
uint32  startPageIndex = 0,
uint32  endPageIndex = 0 
)
pure virtual

Quickly scan the given PDF stream and find any mentions of inks in color spaces.

Parameters
pdfStreamThe input PDF stream to scan.
progressMonitorA smart pointer to an IProgressMonitor object which can be NULL if no such object was passed in.
startPageIndexOptional index of the first page to scan. Pages are numbered starting with page 0, which is the default value.
endPageIndexOptional index of the end page. This is the index after the last page, where the number of pages to scan is equal to (endPageIndex - startPageIndex). Setting this parameter to 0 indicates that the function should scan up to and including the final page.

◆ scanPdfForInks() [2/3]

virtual CPdfScannedInkVect JawsMako::IPDFInput::scanPdfForInks ( const String pathToFile,
const IProgressMonitorPtr &  progressMonitor,
uint32  startPageIndex = 0,
uint32  endPageIndex = 0 
)
pure virtual

Quickly scan the PDF file at the given wide character path and find any mentions of inks in color spaces.

Parameters
pathToFileThe path to the input file to scan.
progressMonitorA smart pointer to an IProgressMonitor object which can be NULL if no such object was passed in.
startPageIndexOptional index of the first page to scan. Pages are numbered starting with page 0, which is the default value.
endPageIndexOptional index of the end page. This is the index after the last page, where the number of pages to scan is equal to (endPageIndex - startPageIndex). Setting this parameter to 0 indicates that the function should scan up to and including the final page.

◆ scanPdfForInks() [3/3]

virtual CPdfScannedInkVect JawsMako::IPDFInput::scanPdfForInks ( const U8String pathToFile,
const IProgressMonitorPtr &  progressMonitor,
uint32  startPageIndex = 0,
uint32  endPageIndex = 0 
)
pure virtual

Quickly scan the PDF file at the given UTF-8 path and find any mentions of inks in color spaces.

Parameters
pathToFileThe path to the input file to scan.
progressMonitorA smart pointer to an IProgressMonitor object which can be NULL if no such object was passed in.
startPageIndexOptional index of the first page to scan. Pages are numbered starting with page 0, which is the default value.
endPageIndexOptional index of the end page. This is the index after the last page, where the number of pages to scan is equal to (endPageIndex - startPageIndex). Setting this parameter to 0 indicates that the function should scan up to and including the final page.

◆ setDefaultRenderingIntent()

virtual void JawsMako::IPDFInput::setDefaultRenderingIntent ( eRenderingIntent  intent)
pure virtual

Override the default rendering intent in the PDF.

     The default is RelativeColorimetric, as per the PDF specification.

◆ setFailOnFontFallback()

virtual void JawsMako::IPDFInput::setFailOnFontFallback ( bool  failOnFontFallback)
pure virtual

Set whether or not to fail when a font cannot be found and PDF input needs to use a fallback font or create and emulated font.

If false, font substitution and/or font emulation for missing fonts is allowed, which is sensible behaviour for general use cases. If a font is found to be invalid, a font may be sought on the users system or substituted.

If true, PDF input will fail and an exception thrown if a font requires the use of a fallback font or an emulated font, or if a damaged font is found and needs to be substituted.

The default is false.

◆ setPassword()

virtual void JawsMako::IPDFInput::setPassword ( const U8String password)
pure virtual

Set the password that should be used when attempting to open PDF files. For password encrypted PDF, this is the user or owner password. For PDF files encrypted with public key cryptography, this is the password to be used to extract the private key from the PKCS12/PFX container. The default is no password.

Parameters
passwordThe password to use. Assumed to be UTF8.

◆ setPkcs12()

virtual void JawsMako::IPDFInput::setPkcs12 ( const IRAInputStreamPtr &  pkcs12)
pure virtual

Set the stream containing the PKCS12/PFX data containing the private key used to decrypt the PDF when public key encryption is used.

Note: Public Key Encryption is only supported on Linux and Windows (non-UWP) platforms at this time.

Parameters
pkcs12A random access stream pointing to a pkcs12/pfx file for the user that is authorised as a recipient for this PDF.

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