A page from an IDocument, allowing high level page management, and providing on-demand access to page contents. More...
#include <jawsmako.h>
Public Member Functions | |
virtual double | getWidth ()=0 |
Get the page (media) width of the page. This does not require the page contents to be loaded. | |
virtual double | getHeight ()=0 |
Get the page (media) height of the page. | |
virtual FRect | getCropBox ()=0 |
Get the CropBox for this page. The CropBox is a rectangle defining the visible region of the page. | |
virtual FRect | getBleedBox ()=0 |
Get the BleedBox for this page. The BleedBox is a rectangle defining the region to which the contents of the page should be clipped when output in a production environment. | |
virtual FRect | getTrimBox ()=0 |
Get the TrimBox for this page. The TrimBox is a rectangle defining the intended dimensions of the finished page after trimming. | |
virtual FRect | getContentBox ()=0 |
Get the ContentBox for this page. The ContentBox (also known as an ArtBox) is a rectangle defining the extent of the page’s meaningful content. | |
virtual int32 | getRotate ()=0 |
Get the view rotation for the page, in degrees clockwise. | |
virtual void | setRotate (int32 rotate)=0 |
Set the view rotation for the page, in degrees clockwise. Must be a multiple of 90 degrees. | |
virtual IDOMFixedPagePtr | getContent ()=0 |
Return a smart pointer to the IDOMFixedPage, loading it from the source document if necessary. | |
virtual IPageRasterPtr | getPageRaster ()=0 |
Return a smart pointer to the IPageRaster, loading it from the source document if necessary. You can only get either the IDOMFixedPage or the IPageRaster equivalent of the page. This is optional, not all sources support generating a page raster. | |
virtual IDOMFixedPagePtr | edit ()=0 |
Mark the page as edited, returning the editable IDOMFixedPage. Do this before attempting to edit the page contents. The markup DOM will be set to incomplete and may be edited in arbitrary ways. | |
virtual void | revert ()=0 |
Revert any edits to a page and mark the page as non-edited if possible. | |
virtual bool | isLoaded ()=0 |
Has the page been loaded? That is, has the DOM been fetched? | |
virtual bool | isEdited ()=0 |
Has the page been edited? That is, has the DOM been fetched? | |
virtual void | setMetadataChanged () const =0 |
Let the page know that the content metadata has changed. For example if either of the MediaBox, CropBox, TrimBox or ArtBox has changed. | |
virtual void | setContent (const IDOMFixedPagePtr &content)=0 |
Replace the content with the given fixed page. | |
virtual void | release ()=0 |
Release the reference to the page content, if possible. If a page is not edited, and the original source is available, the IPage's reference to the page content will be released. This is useful to release the memory associated with the page content if a page is not to be accessed again. The content may be safely requested again using getContent(). | |
virtual CAnnotationVect | getAnnotations ()=0 |
Get the annotations for the page, as a vector. | |
virtual void | addAnnotation (const IAnnotationPtr &annotation)=0 |
Add the given annotation. | |
virtual IAnnotationPtr | findAnnotation (const IAnnotationReferencePtr &reference)=0 |
Find the annotation with the given annotation reference within the page. Throws an IError if the target could not be found. | |
virtual void | removeAnnotation (uint32 index)=0 |
Remove the annotation at the given index. | |
virtual void | removeAnnotation (const IAnnotationPtr &annotation)=0 |
Remove the given annotation from the page. If the page is not present, an exception will be thrown. | |
virtual void | removeAnnotations ()=0 |
Remove all the annotations from the page. | |
virtual void | getTextRuns (CTextRunVect &runs)=0 |
Get the page's text runs. Text present in Tiling brushes will not be returned. | |
virtual IDOMCatalogPtr | getCatalog () const =0 |
Get the IDOMCatalog associated with this page. | |
virtual DOMid | getPageId ()=0 |
Get the Id of the page. | |
virtual COutputIntentVect | getOutputIntents ()=0 |
Get the output intents, if present. | |
virtual IDOMJobTkPtr | getJobTicket () const =0 |
Get the page job ticket, if present. | |
virtual void | setJobTicket (const IDOMJobTkPtr &jobTicket)=0 |
Set the page job ticket. | |
virtual IPagePtr | clone ()=0 |
Clone an IPage. For edited pages, this will clone the DOM tree. | |
virtual IPDFObjectPtr | lookupFarReference (const IPDFFarReferencePtr &farReference, IPDFObjectStorePtr &store, const IDocumentPtr &document=IDocumentPtr())=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. 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 page level object store. Objects which are controlled by formal Mako APIs may not be reachable, and may be overridden at output. | |
virtual FBox | getMediaBox () const =0 |
Obtain the PDF media box for this page. | |
virtual void | setMediaBox (const FBox &mediaBox)=0 |
Set the PDF media box for this page. | |
virtual IPageLabelPtr | getPageLabel ()=0 |
Get the page label. | |
virtual void | setPageLabel (const IPageLabelPtr &pageLabel)=0 |
Set the page label. | |
virtual float | getUserUnit (bool fixed=false)=0 |
Get the PDF UserUnit. | |
![]() | |
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 IPagePtr | create (const IJawsMakoPtr &jawsMako) |
Create an empty page. | |
Additional Inherited Members | |
![]() | |
virtual | ~IRCObject () |
Virtual destructor. | |
A page from an IDocument, allowing high level page management, and providing on-demand access to page contents.
|
pure virtual |
Add the given annotation.
annotation | The annotation to be added. |
|
pure virtual |
Clone an IPage. For edited pages, this will clone the DOM tree.
|
static |
Create an empty page.
jawsMako | The JawsMako instance. |
|
pure virtual |
Mark the page as edited, returning the editable IDOMFixedPage. Do this before attempting to edit the page contents. The markup DOM will be set to incomplete and may be edited in arbitrary ways.
This also prevents the fixed page from being purged in low memory conditions.
|
pure virtual |
Find the annotation with the given annotation reference within the page. Throws an IError if the target could not be found.
reference | The annotation reference to find. |
|
pure virtual |
Get the annotations for the page, as a vector.
|
pure virtual |
Get the BleedBox for this page. The BleedBox is a rectangle defining the region to which the contents of the page should be clipped when output in a production environment.
The returned rect is relative to the top left of the page.
|
pure virtual |
Get the IDOMCatalog associated with this page.
|
pure virtual |
Return a smart pointer to the IDOMFixedPage, loading it from the source document if necessary.
|
pure virtual |
Get the ContentBox for this page. The ContentBox (also known as an ArtBox) is a rectangle defining the extent of the page’s meaningful content.
The returned rect is relative to the top left of the page.
|
pure virtual |
Get the CropBox for this page. The CropBox is a rectangle defining the visible region of the page.
The returned rect is relative to the top left of the page.
|
pure virtual |
Get the page (media) height of the page.
|
pure virtual |
Get the page job ticket, if present.
|
pure virtual |
Obtain the PDF media box for this page.
The PDF Media box is reflected in the width and height of the page (see IPage::getWidth() and IPage::getHeight() as well as the IDOMFixedPage APIs IDOMFixedPage::getWidth() and IDOMFixedPage::getHeight()). However, PDF Media Boxes also allow the document to specify the origin of the page which IPage and the IDOMFixedPage do not provide.
Here, the PDF media box can be queried. Unlike the other box APIs above, the returned box uses the PDF coordinate system, where x increases to the right, y increases up, and 72 units represents one inch. Note also that Mako transparently handles UserUnit internally, and so the returned box has the UserUnit already incorporated.
|
pure virtual |
Obtain access to the page 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 output intents, if present.
|
pure virtual |
Get the Id of the page.
|
pure virtual |
Get the page label.
|
pure virtual |
Return a smart pointer to the IPageRaster, loading it from the source document if necessary. You can only get either the IDOMFixedPage or the IPageRaster equivalent of the page. This is optional, not all sources support generating a page raster.
|
pure virtual |
Get the view rotation for the page, in degrees clockwise.
|
pure virtual |
Get the page's text runs. Text present in Tiling brushes will not be returned.
[out] | runs | A vector of text runs for the page. |
|
pure virtual |
Get the TrimBox for this page. The TrimBox is a rectangle defining the intended dimensions of the finished page after trimming.
The returned rect is relative to the top left of the page.
|
pure virtual |
Get the PDF UserUnit.
Convenience function to get the UserUnit value that would be written if the page was output to PDF. The UserUnit value represents the size of default user space units, in multiples of 1/72 inch.
PDF versions beginning with 1.6 allow a UserUnit to be defined in the page dictionary which may be used to support larger page dimensions. In PDF versions earlier than PDF 1.6, the size of the default user space unit is fixed at 1/72 inch (UserUnit 1.0).
fixed | Boolean value indicating whether the size of the default user space must be fixed (PDF versions earlier than 1.6). When set to true, an IError of code EDL_ERR_PAGE_TOO_LARGE will be thrown if the UserUnit is calculated to be greater than 1.0. The default value is false. |
|
pure virtual |
Get the page (media) width of the page. This does not require the page contents to be loaded.
|
pure virtual |
Has the page been edited? That is, has the DOM been fetched?
|
pure virtual |
Has the page been loaded? That is, has the DOM been fetched?
|
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. 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. |
document | If provided, this document will be searched for the far reference if the object is not stored alongside this page. |
|
pure virtual |
Release the reference to the page content, if possible. If a page is not edited, and the original source is available, the IPage's reference to the page content will be released. This is useful to release the memory associated with the page content if a page is not to be accessed again. The content may be safely requested again using getContent().
If the page content cannot be released, nothing will happen.
|
pure virtual |
Remove the given annotation from the page. If the page is not present, an exception will be thrown.
annotation | The annotation to be removed. |
|
pure virtual |
Remove the annotation at the given index.
index | The index of the annotation to be removed (0 being the first document). |
|
pure virtual |
Revert any edits to a page and mark the page as non-edited if possible.
This may not be used if the page was created as a new page, as there is nothing to revert to. In this case an IError exception will be thrown.
|
pure virtual |
Replace the content with the given fixed page.
content | The fixed page to set as the content of the page. |
|
pure virtual |
Set the page job ticket.
jobTicket | The job ticket to set. |
|
pure virtual |
Set the PDF media box for this page.
The PDF Media box is reflected in the width and height of the page (see IPage::getWidth() and IPage::getHeight() as well as the IDOMFixedPage APIs IDOMFixedPage::getWidth() and IDOMFixedPage::getHeight()). However, PDF Media Boxes also allow the document to specify the origin of the page which IPage and the IDOMFixedPage do not provide.
Here, the PDF media box can be replaced allowing the origin of the page to be changed.
The provided box must be using the PDF coordinate system where x increases to the right, y increases upward, and 72 units represents one inch. Note that Mako internally handles UserUnit automatically, and so the coordinates are in final viewing PDF units, and not the PDF default units.
When the new media box is set, any edited DOM will be modified to reflect the change by offsetting the content, and any annotation rectangles will be updated to suit.
mediaBox | The desired MediaBox. |
|
pure virtual |
Set the page label.
pageLabel | The page label. Setting a value of NULL specifies that the page label is a continuation from the previous page in the document's labelling range, as described in the PDF reference. |
|
pure virtual |
Set the view rotation for the page, in degrees clockwise. Must be a multiple of 90 degrees.
rotate | The rotation to set, in degrees clockwise. |