Mako 7.5.0 API
Loading...
Searching...
No Matches
JawsMako::IDocument Class Referenceabstract

A document from an IDocumentAssembly, allowing for high level document and page mangement, and providing on-demand lazy loading of page markup. More...

#include <jawsmako.h>

Inheritance diagram for JawsMako::IDocument:

Public Member Functions

virtual uint32 getNumPages ()=0
 Return the number of pages in the document, if known.
 
virtual IPagePtr getPage (uint32 index=0)=0
 Get the IPage from the document at the given index.
 
virtual bool pageExists (uint32 index)=0
 Determine if a page with the given index exists in the document.
 
virtual void insertPage (const IPagePtr &page, uint32 index=0, const IDocumentPtr &sourceDocument=IDocumentPtr())=0
 Insert a page into the document at the given index. Note that the page will not be cloned, and so any changes to the added page will affect all users of the page. The interactive forms will be updated with any widget annotations present on the page. Note that if the names of any widgets being added clash with existing widgets or fields they will be forcibly renamed. Provide a sourceDocument if possible for improved form merging.
 
virtual void appendPage (const IPagePtr &page, const IDocumentPtr &sourceDocument=IDocumentPtr())=0
 Append a page to the document.
 
virtual void removePage (uint32 index)=0
 Remove the page at the given index.
 
virtual void removePage (const IPagePtr &page)=0
 Remove the given page from the document. If the page is not present, ane exception will result.
 
virtual void findTarget (DOMid targetId, uint32 &pageNum)=0
 Find the page contatining the target with the given DOMid in the document, providing the index of the page within the document. Throws an IError if the target could not be found.
 
virtual IAnnotationPtr findAnnotation (const IAnnotationReferencePtr &reference)=0
 Find the annotation with the given annotation reference within the document. Throws an IError if the target could not be found.
 
virtual IAnnotationPtr findAnnotation (const IAnnotationReferencePtr &reference, uint32 &pageNum)=0
 Find the annotation with the given annotation reference within the document, providing the index of the page that contains the annotation. Throws an IError if the target could not be found.
 
virtual IDOMJobTkPtr getJobTicket () const =0
 Get the document job ticket, if present.
 
virtual void setJobTicket (const IDOMJobTkPtr &jobTicket)=0
 Set the document job ticket.
 
virtual COutputIntentVect getOutputIntents () const =0
 Get the output intents, if present.
 
virtual IOptionalContentPtr getOptionalContent () const =0
 Get the optional content if present.
 
virtual void setOptionalContent (const IOptionalContentPtr &optionalContent)=0
 Set the optional content for the document, or NULL if if should be removed.
 
virtual IStructurePtr getStructure () const =0
 Get the structure information if present.
 
virtual void setStructure (const IStructurePtr &structure)=0
 Set the structure content for the document, or NULL if if should be removed.
 
virtual IDOMOutlinePtr getOutline () const =0
 Get the document outline, if present.
 
virtual void setOutline (const IDOMOutlinePtr &outline)=0
 Set the document outline, if present.
 
virtual IFormPtr getForm () const =0
 Get the document interactive form, if present.
 
virtual void setForm (const IFormPtr &form)=0
 Set the document interactive form. May be NULL.
 
virtual CFileSpecAsEmbeddedDataVect getEmbeddedStreams ()=0
 Get any embedded streams or attachments attached to the document. This is currently a PDF-specific feature.
 
virtual void addEmbeddedStream (const IFileSpecAsEmbeddedDataPtr &embeddedData)=0
 Add an embedded file stream to the document. This is currently a PDF-specific feature.
 
virtual CNamedDestinationVect getNamedDestinations ()=0
 Get any named destinations present in the document.
 
virtual void addNamedDestination (const INamedDestinationPtr &namedDestination)=0
 Add a named destination to the document. Note that this will override any named destination with the same name that may be present.
 
virtual void setNamedDestinations (const CNamedDestinationVect &namedDestinations)=0
 Replace the named destinations in the document with the given vector. Note that if there are multiple destinations with the same name, the results are undefined.
 
virtual IThreadsPtr getThreads () const =0
 Get the document threads, if present.
 
virtual IDocumentPtr clone ()=0
 Clone an IDocument. Will also clone all the pages in the document.
 
virtual IPDFObjectPtr lookupFarReference (const IPDFFarReferencePtr &farReference, IPDFObjectStorePtr &store)=0
 Attempt to find and resolve an indirect far reference to a PDF object. If found, the object store that contained it will be provided. If not found at the document level, the documents' pages will be searched. Objects which are controlled by formal Mako APIs may not be reachable, and may be overridden at output.
 
virtual IPDFObjectStorePtr getObjectStore ()=0
 Obtain access to the document level object store. Objects which are controlled by formal Mako APIs may not be reachable, and may be overridden at output.
 
virtual IPDFObjectPtr readPdfObject (const IPDFReferencePtr &reference)=0
 Raw access to the PDF object data base from an original PDF file. For informational purposes only; the objects returned from this interface must not be edited.
 
virtual IPDFDictionaryPtr readPdfTrailerDictionary ()=0
 Raw access to the PDF trailer dictionary. For informational purposes only; the object returned from this interface must not be edited.
 
- 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 IDocumentPtr create (const IJawsMakoPtr &jawsMako, const IProgressMonitorPtr &progressMonitor=IProgressMonitorPtr())
 Create an empty document.
 

Additional Inherited Members

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

Detailed Description

A document from an IDocumentAssembly, allowing for high level document and page mangement, and providing on-demand lazy loading of page markup.

Member Function Documentation

◆ addEmbeddedStream()

virtual void JawsMako::IDocument::addEmbeddedStream ( const IFileSpecAsEmbeddedDataPtr & embeddedData)
pure virtual

Add an embedded file stream to the document. This is currently a PDF-specific feature.

Parameters
embeddedDataThe embedded file stream to be added.

◆ addNamedDestination()

virtual void JawsMako::IDocument::addNamedDestination ( const INamedDestinationPtr & namedDestination)
pure virtual

Add a named destination to the document. Note that this will override any named destination with the same name that may be present.

Parameters
namedDestinationThe named destination to be added

◆ appendPage()

virtual void JawsMako::IDocument::appendPage ( const IPagePtr & page,
const IDocumentPtr & sourceDocument = IDocumentPtr() )
pure virtual

Append a page to the document.

Parameters
pagesmart pointer to the page to be inserted.
sourceDocument(optional) the source document that the page came from. If provided, the target document's outline will be update with any outline entries present on the inserted page. The interactive forms will be updated with any widget annotations present on the page. Note that if the names of any widgets being added clash with existing widgets or fields they will be forcibly renamed. Provide a sourceDocument if possible for improved form merging.

◆ clone()

virtual IDocumentPtr JawsMako::IDocument::clone ( )
pure virtual

Clone an IDocument. Will also clone all the pages in the document.

Returns
IDocumentPtr The clone.

◆ create()

static JAWSMAKO_API IDocumentPtr JawsMako::IDocument::create ( const IJawsMakoPtr & jawsMako,
const IProgressMonitorPtr & progressMonitor = IProgressMonitorPtr() )
static

Create an empty document.

Parameters
jawsMakoThe JawsMako instance.
progressMonitorA smart pointer to an IProgressMonitor object or NULL if no object was passed.
Returns
IDocumentPtr the new page.

◆ getForm()

virtual IFormPtr JawsMako::IDocument::getForm ( ) const
pure virtual

Get the document interactive form, if present.

Returns
IFormPtr The document form, or NULL if not present.

◆ getJobTicket()

virtual IDOMJobTkPtr JawsMako::IDocument::getJobTicket ( ) const
pure virtual

Get the document job ticket, if present.

Returns
IDOMJobTkPtr the job ticket, or NULL if not present

◆ getNumPages()

virtual uint32 JawsMako::IDocument::getNumPages ( )
pure virtual

Return the number of pages in the document, if known.

Returns
uint32 The number of pages in the document. Note: For streaming inputs such as PCL/5, this will cause the input to block until the document has been consumed and the number of pages known.

◆ getObjectStore()

virtual IPDFObjectStorePtr JawsMako::IDocument::getObjectStore ( )
pure virtual

Obtain access to the document level object store. Objects which are controlled by formal Mako APIs may not be reachable, and may be overridden at output.

Returns
IPDFObjectStorePtr The object store for the document.

◆ getOutline()

virtual IDOMOutlinePtr JawsMako::IDocument::getOutline ( ) const
pure virtual

Get the document outline, if present.

Returns
IDOMOutlinePtr the document outline, or NULL if not present.

◆ getPage()

virtual IPagePtr JawsMako::IDocument::getPage ( uint32 index = 0)
pure virtual

Get the IPage from the document at the given index.

Returns
IPagePtr the requested page, 0 being the first page.

◆ getThreads()

virtual IThreadsPtr JawsMako::IDocument::getThreads ( ) const
pure virtual

Get the document threads, if present.

Returns
IThreadsPtr The document threads, if present.

◆ insertPage()

virtual void JawsMako::IDocument::insertPage ( const IPagePtr & page,
uint32 index = 0,
const IDocumentPtr & sourceDocument = IDocumentPtr() )
pure virtual

Insert a page into the document at the given index. Note that the page will not be cloned, and so any changes to the added page will affect all users of the page. The interactive forms will be updated with any widget annotations present on the page. Note that if the names of any widgets being added clash with existing widgets or fields they will be forcibly renamed. Provide a sourceDocument if possible for improved form merging.

Parameters
pagesmart pointer to the page to be inserted.
indexThe position in the document to insert the page, 0 being the first position.
sourceDocument(optional) the source document that the page came from. If provided, the target document's outline will be update with any outline entries present on the inserted page.

◆ lookupFarReference()

virtual IPDFObjectPtr JawsMako::IDocument::lookupFarReference ( const IPDFFarReferencePtr & farReference,
IPDFObjectStorePtr & store )
pure virtual

Attempt to find and resolve an indirect far reference to a PDF object. If found, the object store that contained it will be provided. If not found at the document level, the documents' pages will be searched. Objects which are controlled by formal Mako APIs may not be reachable, and may be overridden at output.

Parameters
farReferenceThe far reference to resolve.
storeA reference to receive the store where the object was located.
Returns
IPDFObject The resolved object, or NULL if the resolved object was not found.

◆ pageExists()

virtual bool JawsMako::IDocument::pageExists ( uint32 index)
pure virtual

Determine if a page with the given index exists in the document.

Parameters
indexThe index of the page to check, 0 being the first page.
Returns
bool True if the document has a page with the given index.

◆ readPdfObject()

virtual IPDFObjectPtr JawsMako::IDocument::readPdfObject ( const IPDFReferencePtr & reference)
pure virtual

Raw access to the PDF object data base from an original PDF file. For informational purposes only; the objects returned from this interface must not be edited.

Parameters
referenceThe indirect reference to be retrieved, or NULL to read the document's Catalog dictionary.
Returns
IPDFObjectPtr The read object, or NULL if there is no such object.

◆ readPdfTrailerDictionary()

virtual IPDFDictionaryPtr JawsMako::IDocument::readPdfTrailerDictionary ( )
pure virtual

Raw access to the PDF trailer dictionary. For informational purposes only; the object returned from this interface must not be edited.

Returns
IPDFDictionaryPtr The trailer dictionary, or null if no trailer dictionary is available.

◆ removePage()

virtual void JawsMako::IDocument::removePage ( uint32 index)
pure virtual

Remove the page at the given index.

Parameters
indexThe index of the page to be removed (0 being the first page)

◆ setNamedDestinations()

virtual void JawsMako::IDocument::setNamedDestinations ( const CNamedDestinationVect & namedDestinations)
pure virtual

Replace the named destinations in the document with the given vector. Note that if there are multiple destinations with the same name, the results are undefined.

Parameters
namedDestinationsThe vector of named destinations

◆ setOutline()

virtual void JawsMako::IDocument::setOutline ( const IDOMOutlinePtr & outline)
pure virtual

Set the document outline, if present.

Parameters
outlineThe desired document outline, or NULL to set no outline.

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