A document from an IDocumentAssembly, allowing for high level document and page management, and providing on-demand lazy loading of page markup. More...
#include <jawsmako.h>
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. | |
virtual void | appendPage (const IPagePtr &page, const IDocumentPtr &sourceDocument=IDocumentPtr())=0 |
Append a page to the document. If the source document that the page came from is provided: | |
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, an exception will result. | |
virtual void | findTarget (DOMid targetId, uint32 &pageNum)=0 |
Find the page containing 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. A PDF may have more than one output intent; for standards such as PDF/X-4, only the first is relevant. | |
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. | |
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. | |
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. | |
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. | |
virtual void | setNamedDestinations (const CNamedDestinationVect &namedDestinations)=0 |
Replace the named destinations in the document with the given vector. | |
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 database 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. | |
![]() | |
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 | |
![]() | |
virtual | ~IRCObject () |
Virtual destructor. | |
A document from an IDocumentAssembly, allowing for high level document and page management, and providing on-demand lazy loading of page markup.
|
pure virtual |
Add an embedded file stream to the document. This is currently a PDF-specific feature.
embeddedData | The embedded file stream to be added. |
|
pure virtual |
Add a named destination to the document.
namedDestination | The named destination to be added. |
|
pure virtual |
Append a page to the document. If the source document that the page came from is provided:
page | Smart pointer to the page to be inserted. |
sourceDocument | (optional) The source document that the page came from |
|
pure virtual |
Clone an IDocument. Will also clone all the pages in the document.
|
static |
Create an empty document.
jawsMako | The JawsMako instance. |
progressMonitor | A smart pointer to an IProgressMonitor object or NULL if no object was passed. |
|
pure virtual |
Find the annotation with the given annotation reference within the document. Throws an IError if the target could not be found.
reference | The annotation reference sought |
|
pure virtual |
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.
[in] | reference | The annotation reference sought |
[out] | pageNum | A zero-based page number where the object was found |
|
pure virtual |
Find the page containing 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.
[in] | targetId | The DOMid of the object sought |
[out] | pageNum | A zero-based page number where the object was found |
|
pure virtual |
Get any embedded streams or attachments attached to the document. This is currently a PDF-specific feature.
|
pure virtual |
Get the document interactive form, if present.
|
pure virtual |
Get the document job ticket, if present.
|
pure virtual |
Get any named destinations present in the document.
|
pure virtual |
Return the number of pages in the document, if known.
|
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.
|
pure virtual |
Get the optional content if present.
|
pure virtual |
Get the document outline, if present.
|
pure virtual |
Get the output intents, if present. A PDF may have more than one output intent; for standards such as PDF/X-4, only the first is relevant.
|
pure virtual |
Get the IPage from the document at the given index.
index | The index of the required page, 0 being the first page. |
|
pure virtual |
Get the structure information if present.
|
pure virtual |
Get the document threads, if present.
|
pure virtual |
Insert a page into the document at the given index.
page | smart pointer to the page to be inserted. |
index | The 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 updated with any outline entries present on the inserted page. |
|
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.
farReference | The far reference to resolve. |
store | A reference to receive the store where the object was located. |
|
pure virtual |
Determine if a page with the given index exists in the document.
index | The index of the page to check, 0 being the first page. |
|
pure virtual |
Raw access to the PDF object database from an original PDF file. For informational purposes only; the objects returned from this interface must not be edited.
reference | The indirect reference to be retrieved, or NULL to read the document's Catalog dictionary. |
|
pure virtual |
Raw access to the PDF trailer dictionary. For informational purposes only; the object returned from this interface must not be edited.
|
pure virtual |
Remove the given page from the document. If the page is not present, an exception will result.
page | Smart pointer to the page to be removed. |
|
pure virtual |
Remove the page at the given index.
index | The index of the page to be removed (0 being the first page) |
|
pure virtual |
Set the document interactive form.
form | The form to be set. May be NULL. |
|
pure virtual |
Set the document job ticket.
jobTicket | The job ticket. |
|
pure virtual |
Replace the named destinations in the document with the given vector.
namedDestinations | The vector of named destinations |
|
pure virtual |
Set the optional content for the document.
optionalContent | The optional content to set, or NULL to remove. |
|
pure virtual |
Set the document outline, if present.
outline | The desired document outline, or NULL to remove. |
|
pure virtual |
Set the structure content for the document.
structure | The document structure to set, or NULL to remove. |