SourceForge.net Logo
aXSL API 0.2

org.axsl.pdf
Interface PdfDocument


public interface PdfDocument

A PDF document.


Method Summary
 void addDefaultFilter(java.lang.String filterName)
          Adds a standard filter to the document.
 void close()
          Wraps up the processing of the document, completing the writing of any open objects and the document trailer, then closing any resources, including any open output streams.
 PdfColor createPdfColor(java.awt.Color color)
          Get or create an implementation-specific PDFColor instance.
 PdfEncryption createPdfEncryption()
          Create an implementation-specific PDFEncryption instance to be used by this document.
 PdfPage createPdfPage(int pagewidth, int pageheight)
          Create an implementation-specific PDFPage instance.
 PdfOutlineParent getOutlineRoot()
          Get the root Outlines object.
 PdfFont getPdfFont(FontUse fontUse)
          Looks up or creates a PDFFont for a given font.
 void setAuthor(java.lang.String author)
          Sets the author of the document.
 void setCreationDate(java.util.Date creationDate)
          Sets the "creation date" document meta-information for the PDF document.
 void setKeywords(java.lang.String keywords)
          Sets the keywords of the document.
 void setProducer(java.lang.String producer)
          Sets the "producer" document meta-information for the PDF document.
 void setSubject(java.lang.String subject)
          Sets the subject of the document.
 void setTitle(java.lang.String title)
          Sets the title of the document.
 void setVersion(PdfVersion newVersion)
          Sets the PDF version that should be created when this document is written.
 void writeHeader()
          Writes the PDF header.
 void writeIndirectObjects()
          Writes any used but unwritten indirect objects into the stream.
 

Method Detail

setVersion

void setVersion(PdfVersion newVersion)
Sets the PDF version that should be created when this document is written. If not set, the default value is implementation-dependent. Note that setting this value to a lower version will only eliminate features that are known to cause problems in PDF applications supporting a lower version. If a feature is not supported in a lower version, but causes no problems for that lower version, it will be included, so that applications supporting higher versions may take advantage of it.

Parameters:
newVersion - The new PDFVersion for this document.

setTitle

void setTitle(java.lang.String title)
Sets the title of the document.

Parameters:
title - The new title for the document.

setAuthor

void setAuthor(java.lang.String author)
Sets the author of the document.

Parameters:
author - The new author of the document.

setSubject

void setSubject(java.lang.String subject)
Sets the subject of the document.

Parameters:
subject - The new subject of the document.

setKeywords

void setKeywords(java.lang.String keywords)
Sets the keywords of the document.

Parameters:
keywords - The new keywords of the document.

setProducer

void setProducer(java.lang.String producer)
Sets the "producer" document meta-information for the PDF document.

Parameters:
producer - The name of the producer of the PDF document.

setCreationDate

void setCreationDate(java.util.Date creationDate)
Sets the "creation date" document meta-information for the PDF document.

Parameters:
creationDate - The creation date of the PDF document.

addDefaultFilter

void addDefaultFilter(java.lang.String filterName)
Adds a standard filter to the document.

Parameters:
filterName - The name of the standard filter to be added.

writeHeader

void writeHeader()
                 throws PdfException
Writes the PDF header.

Throws:
PdfException - If there is an error during the writing.

close

void close()
           throws PdfException
Wraps up the processing of the document, completing the writing of any open objects and the document trailer, then closing any resources, including any open output streams.

Throws:
PdfException - For errors during writing or closing any open OutputStream.

getPdfFont

PdfFont getPdfFont(FontUse fontUse)
Looks up or creates a PDFFont for a given font.

Parameters:
fontUse - The font instance for which a PDFFont is needed.
Returns:
The PDFFont that is tied to fontUse.

getOutlineRoot

PdfOutlineParent getOutlineRoot()
Get the root Outlines object.

Returns:
The root Outlines object.

writeIndirectObjects

void writeIndirectObjects()
                          throws PdfException
Writes any used but unwritten indirect objects into the stream. This can be done as often as desired.

Throws:
PdfException - For errors writing to the OutputStream.

createPdfEncryption

PdfEncryption createPdfEncryption()
Create an implementation-specific PDFEncryption instance to be used by this document.

Returns:
An implementation-specific PDFEncryption instance.

createPdfColor

PdfColor createPdfColor(java.awt.Color color)
Get or create an implementation-specific PDFColor instance.

Parameters:
color - The color that should be created.
Returns:
An implementation-specific PDFColor instance.

createPdfPage

PdfPage createPdfPage(int pagewidth,
                      int pageheight)
Create an implementation-specific PDFPage instance.

Parameters:
pagewidth - The width of the page that should be created, in millipoints.
pageheight - The height of the page that should be created, in millipoints.
Returns:
An implementation-specific PDFPage instance.

SourceForge.net Logo
aXSL API 0.2

This documentation was created August 8 2007 by The aXSL Group and may be freely copied. See license for details.