de.dante.extex.backend.documentWriter
Interface PdftexSupport

All Known Implementing Classes:
DumpDocumentWriter

public interface PdftexSupport

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

Version:
$Revision: 1.5 $
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, Box box)
          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

public PdfAnnotation getAnnotation(RuleNode node,
                                   java.lang.String annotation)
                            throws InterpreterException
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:
InterpreterException - in case of an error

getObject

public PdfObject getObject(java.lang.String attr,
                           boolean isStream,
                           java.lang.String text)
                    throws InterpreterException
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:
InterpreterException - in case of an error

getXForm

public PdfXForm getXForm(java.lang.String attr,
                         java.lang.String resources,
                         Box box)
                  throws InterpreterException
Factory method to construct a PdfXForm node.

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

getXImage

public PdfRefXImage getXImage(java.lang.String resource,
                              RuleNode rule,
                              java.lang.String attr,
                              long page,
                              boolean immediate)
                       throws InterpreterException
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:
InterpreterException - in case of an error

pdfcatalog

public 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

public 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

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

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

pdfincludechars

public 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

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

Parameters:
text - the text to add

pdflastannot

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

Returns:
the last annotation index or -1 if none

pdflastobj

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

Returns:
the last object index or -1 if none

pdflastxform

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

Returns:
the last XForm index or -1 if none

pdflastximage

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

Returns:
the last XImage index or -1 if none

pdfnames

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

Parameters:
text - the text to add

pdfoutline

public 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