An instance of the JawsMako PDF input class. More...
#include <pdfinput.h>
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. | |
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. | |
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. | |
virtual void | setImproveGlyphSelectionForUnembeddedIdentityFonts (bool improve)=0 |
Set whether or not to attempt to improve glyph selection for non- embedded Identity CIDFonts. | |
virtual void | setDefaultRenderingIntent (eRenderingIntent intent)=0 |
Override the default rendering intent in the PDF. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
virtual uint32 | getNumIncrementalSaves (const U8String &pathToFile)=0 |
Find the number of incremental saves in the given PDF stream. | |
virtual uint32 | getNumIncrementalSaves (const String &pathToFile)=0 |
Find the number of incremental saves in the given PDF stream. | |
virtual uint32 | getNumIncrementalSaves (const IInputStreamPtr &pdfStream)=0 |
Find the number of incremental saves in the given PDF stream. | |
virtual IDocumentAssemblyPtr | openIncremental (const U8String &pathToFile, uint32 incrementalIndex)=0 |
Open an incremental PDF stream, returning the IDocumentAssembly representing the contents. | |
virtual IDocumentAssemblyPtr | openIncremental (const String &pathToFile, uint32 incrementalIndex)=0 |
Open an incremental PDF stream, returning the IDocumentAssembly representing the contents. | |
virtual IDocumentAssemblyPtr | openIncremental (const IInputStreamPtr &pdfStream, uint32 incrementalIndex)=0 |
Open an incremental PDF stream, returning the IDocumentAssembly representing the contents. | |
virtual CIRAInputStreamVect | getIncrementalSaves (const U8String &pathToFile)=0 |
Find the number of incremental saves in the given PDF stream, returning a vector of streams. | |
virtual CIRAInputStreamVect | getIncrementalSaves (const String &pathToFile)=0 |
Find the number of incremental saves in the given PDF stream, returning a vector of streams. | |
virtual CIRAInputStreamVect | getIncrementalSaves (const IInputStreamPtr &pdfStream)=0 |
Find the number of incremental saves in the given PDF stream, returning a vector of streams. | |
virtual void | setAlternateBaseFont (const U8String &baseFontName, const U8String &alternateFontName)=0 |
Set an alternate base font for cases when the built-in font may not be suitable. | |
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. | |
virtual IDocumentAssemblyPtr | open (const String &pathToFile)=0 |
Open a file on disk, returning the IDocumentAssembly representing the contents. Takes a wide character string. | |
virtual IDocumentAssemblyPtr | open (const IInputStreamPtr &inputStream)=0 |
Open a stream, returning the IDocumentAssembly representing the contents. | |
virtual void | setSequentialMode (bool sequential)=0 |
Set/unset sequential mode on this input. | |
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. | |
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 IPDFInputPtr | create (const IJawsMakoPtr &jawsMako, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr()) |
Create an input for reading source documents in PDF format. | |
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: | |
Additional Inherited Members | |
Protected Member Functions inherited from IRCObject | |
virtual | ~IRCObject () |
Virtual destructor. | |
An instance of the JawsMako PDF input class.
|
static |
Create an input for reading source documents in PDF format.
jawsMako | The IJawsMako object |
progressMonitor | A smart pointer to an IProgressMonitor object which can be NULL if no such object was passed in. |
|
pure virtual |
Find the number of incremental saves in the given PDF stream, returning a vector of streams.
pdfStream | The input PDF stream. |
|
pure virtual |
Find the number of incremental saves in the given PDF stream, returning a vector of streams.
pathToFile | The path to the input file. |
|
pure virtual |
Find the number of incremental saves in the given PDF stream, returning a vector of streams.
pathToFile | The path to the input file. |
|
pure virtual |
Find the number of incremental saves in the given PDF stream.
pdfStream | The input PDF stream. |
|
pure virtual |
Find the number of incremental saves in the given PDF stream.
pathToFile | The path to the input file. |
|
pure virtual |
Find the number of incremental saves in the given PDF stream.
pathToFile | The path to the input file. |
|
pure virtual |
Open an incremental PDF stream, returning the IDocumentAssembly representing the contents.
pdfStream | The input PDF stream. |
incrementalUpdateIndex | The incremental update to load, with valid values being in the range 0 to getNumIncrementalSaves(). |
|
pure virtual |
Open an incremental PDF stream, returning the IDocumentAssembly representing the contents.
pathToFile | The path to the input file. |
incrementalUpdateIndex | The incremental update to load, with valid values being in the range 0 to getNumIncrementalSaves(). |
|
pure virtual |
Open an incremental PDF stream, returning the IDocumentAssembly representing the contents.
pathToFile | The path to the input file. |
incrementalUpdateIndex | The incremental update to load, with valid values being in the range 0 to getNumIncrementalSaves(). |
|
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.
|
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.
|
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.
|
pure virtual |
Quickly scan the given PDF stream and find any mentions of inks in color spaces.
pdfStream | The input PDF stream to scan. |
progressMonitor | A smart pointer to an IProgressMonitor object which can be NULL if no such object was passed in. |
startPageIndex | Optional index of the first page to scan. Pages are numbered starting with page 0, which is the default value. |
endPageIndex | Optional 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. |
|
pure virtual |
Quickly scan the PDF file at the given wide character path and find any mentions of inks in color spaces.
pathToFile | The path to the input file to scan. |
progressMonitor | A smart pointer to an IProgressMonitor object which can be NULL if no such object was passed in. |
startPageIndex | Optional index of the first page to scan. Pages are numbered starting with page 0, which is the default value. |
endPageIndex | Optional 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. |
|
pure virtual |
Quickly scan the PDF file at the given UTF-8 path and find any mentions of inks in color spaces.
pathToFile | The path to the input file to scan. |
progressMonitor | A smart pointer to an IProgressMonitor object which can be NULL if no such object was passed in. |
startPageIndex | Optional index of the first page to scan. Pages are numbered starting with page 0, which is the default value. |
endPageIndex | Optional 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. |
|
pure virtual |
Set an alternate base font for cases when the built-in font may not be suitable.
This function can be used to set the name of a system font that may be used in place of one of the base PDF fonts. Some poorly constructed PDF files attempt define encodings for non-embedded base fonts (e.g Helvetica) with character names that are not present in the Adobe standard Latin character set, and are not available when using Mako's base fonts, but may be present in a system font.
Setting an alternate font name indicates that Mako should substitute a non-embedded Base 35 font with a system font when the PDF encoding defines character names outside of the Adobe standard Latin character set.
baseFontName | The name of a Base 35 font to substitute. Must be a non-symbolic font. |
alternateFontName | The name of a system font to use as a substitute, which must be the name of a system font that can be found with IJawsMako::findFont(). |
|
pure virtual |
Override the default rendering intent in the PDF.
The default is RelativeColorimetric, as per the PDF specification.
|
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.
|
pure virtual |
Set whether or not to attempt to improve glyph selection for non- embedded Identity CIDFonts.
Such fonts are encoded such that glyphs are directly selected by mapping character codes to glyph IDs. Jobs that reference such fonts will only work correctly if the font that is used stores the used characters using the same glyph IDs. This is true if the exact same font is present on the users system as the system where the job was generated. It may work for different versions of the same font, or cases where by convention the same glyphs slots are used.
There are no guarantees that this will be the case in general.
To attempt to improve the situation, Mako will attempt to use other clues to better select glyphs, if this feature is enabled and can oftentimes produce a legible result where disparate fonts are used.
However doing this can disrupt cases where the intent is to write the result to PDF output without the fonts embedded. Here it is necessary to use the same glyph slots regardless of what is stored in them. If IPDFOutput::setEmbedIdentityCidFonts(false) is to be used, then this feature should be disabled also.
The default is true.
|
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.
password | The password to use. Assumed to be UTF8. |
|
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.
pkcs12 | A random access stream pointing to a pkcs12/pfx file for the user that is authorised as a recipient for this PDF. |