DynamicPDF by ceTe Software

com.cete.dynamicpdf.merger
Class ImportedPage

java.lang.Object
  |
  +--com.cete.dynamicpdf.Page
        |
        +--com.cete.dynamicpdf.merger.ImportedPage

public class ImportedPage
extends Page

This class can be used to pull a single selected page from an existing PDF document.

View Example


Constructor Summary
ImportedPage(PdfPage pdfPage)
          Initializes a new instance of the ImportedPage class.
ImportedPage(PdfPage pdfPage, float margins)
          Initializes a new instance of the ImportedPage class.
ImportedPage(java.lang.String filePath, int pageNumber)
          Initializes a new instance of the ImportedPage class.
ImportedPage(java.lang.String filePath, int pageNumber, float margins)
          Initializes a new instance of the ImportedPage class.
 
Method Summary
protected  void drawAnnotations(DocumentWriter writer)
          Draws the annotations to the given com.cete.dynamicpdf.io.DocumentWriter object.
protected  void drawAppend(PageWriter writer)
          Draws the appended output to the given com.cete.dynamicpdf.io.PageWriter object.
protected  void drawContents(DocumentWriter writer)
          Draws the contents to the given com.cete.dynamicpdf.io.DocumentWriter object.
protected  void drawPrepend(PageWriter writer)
          Draws the prepended output to the given com.cete.dynamicpdf.io.PageWriter object.
protected  void drawResources(DocumentWriter writer, PageResources resources)
          Draws the resources to the given com.cete.dynamicpdf.io.DocumentWriter object.
 Group getBackgroundElements()
          Gets a collection of page elements to be drawn as a background on the page.
protected  int getContentObjects()
          Gets the number of content objects used by the imported page.
 PdfPage getPdfPage()
          Gets the imported page that this page will be based on.
protected  boolean hasPageElements(DocumentWriter writer, int pageNumber)
          Returns a boolean value specifying if the page has Page Elements
 
Methods inherited from class com.cete.dynamicpdf.Page
drawDimensions, getApplyDocumentTemplate, getApplySectionTemplate, getDimensions, getElements, getRequiredLicenseLevel, getRotate, setApplyDocumentTemplate, setApplySectionTemplate, setDimensions, setRequiredLicenseLevel, setRotate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportedPage

public ImportedPage(java.lang.String filePath,
                    int pageNumber)
Initializes a new instance of the ImportedPage class.

Parameters:
filePath - Physical file path of the PDF document to import.
pageNumber - Page number to import.

ImportedPage

public ImportedPage(java.lang.String filePath,
                    int pageNumber,
                    float margins)
Initializes a new instance of the ImportedPage class.

Parameters:
filePath - Physical file path of the PDF document to import.
pageNumber - Page number to import.
margins - Margins of the new page. Overrides the default margins.

ImportedPage

public ImportedPage(PdfPage pdfPage)
Initializes a new instance of the ImportedPage class.

Parameters:
pdfPage - PdfPage object to import.
See Also:
PdfPage

ImportedPage

public ImportedPage(PdfPage pdfPage,
                    float margins)
Initializes a new instance of the ImportedPage class.

Parameters:
pdfPage - PdfPage object to import.
margins - Margins of the new page. Overrides the default margins.
See Also:
PdfPage
Method Detail

getContentObjects

protected int getContentObjects()
Gets the number of content objects used by the imported page.

Overrides:
getContentObjects in class Page
Returns:
The number of content objects used by the imported page.

drawContents

protected void drawContents(DocumentWriter writer)
Draws the contents to the given com.cete.dynamicpdf.io.DocumentWriter object.

Overrides:
drawContents in class Page
Parameters:
writer - DocumentWriter to receive the output.
See Also:
DocumentWriter

drawResources

protected void drawResources(DocumentWriter writer,
                             PageResources resources)
Draws the resources to the given com.cete.dynamicpdf.io.DocumentWriter object.

Overrides:
drawResources in class Page
Parameters:
writer - DocumentWriter to receive the output.
resources - The pages resources.
See Also:
DocumentWriter, PageResources

drawPrepend

protected void drawPrepend(PageWriter writer)
Draws the prepended output to the given com.cete.dynamicpdf.io.PageWriter object.

Overrides:
drawPrepend in class Page
Parameters:
writer - PageWriter to receive the output.
See Also:
PageWriter

drawAnnotations

protected void drawAnnotations(DocumentWriter writer)
Draws the annotations to the given com.cete.dynamicpdf.io.DocumentWriter object.

Overrides:
drawAnnotations in class Page
Parameters:
writer - DocumentWriter to receive the output.
See Also:
DocumentWriter

drawAppend

protected void drawAppend(PageWriter writer)
Draws the appended output to the given com.cete.dynamicpdf.io.PageWriter object.

Overrides:
drawAppend in class Page
Parameters:
writer - PageWriter to receive the output.
See Also:
PageWriter

hasPageElements

protected boolean hasPageElements(DocumentWriter writer,
                                  int pageNumber)
Returns a boolean value specifying if the page has Page Elements

Overrides:
hasPageElements in class Page
Parameters:
writer - DocumentWriter to receive the output
pageNumber - The page number to check.
See Also:
DocumentWriter

getBackgroundElements

public Group getBackgroundElements()
Gets a collection of page elements to be drawn as a background on the page. Page elements placed in this collection will appear below the imported PDF data. Use the Page.getElements() property to place page elements on top of the imported PDF data.

Returns:
A collection of page elements to be drawn as a background on the page.
See Also:
Group

getPdfPage

public PdfPage getPdfPage()
Gets the imported page that this page will be based on.


DynamicPDF by ceTe Software

API Reference for DynamicPDF™ for Java generated on December 20, 2005
© Copyright 2005, ceTe Software