|
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 returned rect is relative to the top left of the page.
|
|
virtual FRect | getBleedBox ()=0 |
| Get the BleedBox for this page. The returned rect is relative to the top left of the page.
|
|
virtual FRect | getTrimBox ()=0 |
| Get the TrimBox for this page. The returned rect is relative to the top left of the page.
|
|
virtual FRect | getContentBox ()=0 |
| Get the ContentBox (also know as the ArtBox) for this page. The returned rect is relative to the top left of the page.
|
|
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. This also prevents the fixed page from being purged in low memory conditions. Note: This member may return a different instance than returned by previous invocations of getContent(), however once this routine has been called, subsequent calls to getContent() will return the same instance as that returned here.
|
|
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.
|
|
A page from an IDocument, allowing high level page management, and providing on-demand access to page contents.
virtual void JawsMako::IPage::setMediaBox |
( |
const FBox & | mediaBox | ) |
|
|
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.
- Parameters
-
mediaBox | The desired MediaBox. |