org.extex.pdf.api
Interface PdftexSupport

All Known Implementing Classes:
PdfDocumentWriter

public interface PdftexSupport

This interface describes the methods needed for pdfTeX support to make use of the special features of PDF.

Version:
$Revision$
Author:
Gerd Neugebauer

Method Summary
 PdfAnnotation getAnnotation(RuleNode node, java.lang.String annotation)
          Factory method to construct a PdfAnnotation node.
 PdfObject getObject(java.lang.String attr, boolean isStream, java.lang.String text)
          Factory method to construct a PdfObject node.
 PdfXForm getXForm(java.lang.String attr, java.lang.String resources, NodeList list)
          Factory method to construct a PdfXForm node.
 PdfRefXImage getXImage(java.lang.String resource, RuleNode rule, java.lang.String attr, long page, boolean immediate)
          Factory method to construct a PdfXImage node.
 void pdfcatalog(java.lang.String text, ActionSpec action)
          Add some material to the PDF catalog.
 java.lang.String pdffontname(Font font)
          Retrieve the font name for a given font.
 long pdffontobjnum(Font font)
          Retrieve the font object number for a given font.
 void pdfincludechars(Font font, java.lang.String text)
          Include a set of characters from a font into the output regardless of whether they are used or not.
 void pdfinfo(java.lang.String text)
          This method inserts the text to the info section.
 long pdflastannot()
          Retrieve the object index of the last annotation.
 long pdflastobj()
          Retrieve the object index of the last object.
 long pdflastxform()
          Retrieve the object index of the last XForm.
 long pdflastximage()
          Retrieve the object index of the last XImage.
 void pdfnames(java.lang.String text)
          This method inserts the text to /Names array.
 void pdfoutline(ActionSpec action, long count, java.lang.String text)
          Insert some outline into the PDF output.
 

Method Detail

getAnnotation

PdfAnnotation getAnnotation(RuleNode node,
                            java.lang.String annotation)
                            throws HelpingException
Factory method to construct a PdfAnnotation node.

Parameters:
node - the rule specification. Only the width height and depth are relevant. Either of them can be null.
annotation - the annotation text
Returns:
a PdfAnnotation node
Throws:
HelpingException - in case of an error

getObject

PdfObject getObject(java.lang.String attr,
                    boolean isStream,
                    java.lang.String text)
                    throws HelpingException
Factory method to construct a PdfObject node.

Parameters:
attr - the attribute text. This can be null
isStream - boolean indicator to signal that a stream object or file object is requested
text - the object
Returns:
a PdfObject node
Throws:
HelpingException - in case of an error

getXForm

PdfXForm getXForm(java.lang.String attr,
                  java.lang.String resources,
                  NodeList list)
                  throws HelpingException
Factory method to construct a PdfXForm node.

Parameters:
attr - the attribute text. This can be null
resources - the resources specification
list - the content
Returns:
a PdfXForm node
Throws:
HelpingException - in case of an error

getXImage

PdfRefXImage getXImage(java.lang.String resource,
                       RuleNode rule,
                       java.lang.String attr,
                       long page,
                       boolean immediate)
                       throws HelpingException
Factory method to construct a PdfXImage node.

Parameters:
resource - the resource specification
rule - the rule specification. Only the width height and depth are relevant. Either of them can be null.
attr - the attribute text. This can be null
page - the page number
immediate - the indicator that the image should be put into the PDF output without waiting for a reference
Returns:
a PdfXImage node
Throws:
HelpingException - in case of an error

pdfcatalog

void pdfcatalog(java.lang.String text,
                ActionSpec action)
Add some material to the PDF catalog.

Parameters:
text - the text for the catalog
action - the action specification. This parameter can be null

pdffontname

java.lang.String pdffontname(Font font)
Retrieve the font name for a given font. For instance if a font is addressed as /F12 then this method returns 12.

Parameters:
font - the font to query
Returns:
the name used by PDF for the font

pdffontobjnum

long pdffontobjnum(Font font)
Retrieve the font object number for a given font.

Parameters:
font - the font to query
Returns:
the object number

pdfincludechars

void pdfincludechars(Font font,
                     java.lang.String text)
Include a set of characters from a font into the output regardless of whether they are used or not.

Parameters:
font - the font
text - the set of characters to include

pdfinfo

void pdfinfo(java.lang.String text)
This method inserts the text to the info section.

Parameters:
text - the text to add

pdflastannot

long pdflastannot()
Retrieve the object index of the last annotation.

Returns:
the last annotation index or -1 if none

pdflastobj

long pdflastobj()
Retrieve the object index of the last object.

Returns:
the last object index or -1 if none

pdflastxform

long pdflastxform()
Retrieve the object index of the last XForm.

Returns:
the last XForm index or -1 if none

pdflastximage

long pdflastximage()
Retrieve the object index of the last XImage.

Returns:
the last XImage index or -1 if none

pdfnames

void pdfnames(java.lang.String text)
This method inserts the text to /Names array.

Parameters:
text - the text to add

pdfoutline

void pdfoutline(ActionSpec action,
                long count,
                java.lang.String text)
Insert some outline into the PDF output.

Parameters:
action - the action specification
count - the count
text - the text