com.lowagie.text.pdf

Class SimpleNamedDestination

public final class SimpleNamedDestination extends Object implements SimpleXMLDocHandler

Author: Paulo Soares (psoares@consiste.pt)

Field Summary
HashMapxmlLast
HashMapxmlNames
Constructor Summary
SimpleNamedDestination()
Method Summary
static PdfArraycreateDestinationArray(String value, PdfWriter writer)
voidendDocument()
voidendElement(String tag)
static StringescapeBinaryString(String s)
static voidexportToXML(HashMap names, OutputStream out, String encoding, boolean onlyASCII)
Exports the destinations to XML.
static voidexportToXML(HashMap names, Writer wrt, String encoding, boolean onlyASCII)
Exports the destinations to XML.
static HashMapgetNamedDestination(PdfReader reader, boolean fromNames)
static HashMapimportFromXML(InputStream in)
Import the names from XML.
static HashMapimportFromXML(Reader in)
Import the names from XML.
static PdfDictionaryoutputNamedDestinationAsNames(HashMap names, PdfWriter writer)
static PdfDictionaryoutputNamedDestinationAsStrings(HashMap names, PdfWriter writer)
voidstartDocument()
voidstartElement(String tag, HashMap h)
voidtext(String str)
static StringunEscapeBinaryString(String s)

Field Detail

xmlLast

private HashMap xmlLast

xmlNames

private HashMap xmlNames

Constructor Detail

SimpleNamedDestination

private SimpleNamedDestination()

Method Detail

createDestinationArray

static PdfArray createDestinationArray(String value, PdfWriter writer)

endDocument

public void endDocument()

endElement

public void endElement(String tag)

escapeBinaryString

public static String escapeBinaryString(String s)

exportToXML

public static void exportToXML(HashMap names, OutputStream out, String encoding, boolean onlyASCII)
Exports the destinations to XML. The DTD for this XML is:

 <?xml version='1.0' encoding='UTF-8'?>
 <!ELEMENT Name (#PCDATA)>
 <!ATTLIST Name
    Page CDATA #IMPLIED
 >
 <!ELEMENT Destination (Name)*>
 

Parameters: names the names out the export destination. The stream is not closed encoding the encoding according to IANA conventions onlyASCII codes above 127 will always be escaped with &#nn; if true, whatever the encoding

Throws: IOException on error

exportToXML

public static void exportToXML(HashMap names, Writer wrt, String encoding, boolean onlyASCII)
Exports the destinations to XML.

Parameters: names the names wrt the export destination. The writer is not closed encoding the encoding according to IANA conventions onlyASCII codes above 127 will always be escaped with &#nn; if true, whatever the encoding

Throws: IOException on error

getNamedDestination

public static HashMap getNamedDestination(PdfReader reader, boolean fromNames)

importFromXML

public static HashMap importFromXML(InputStream in)
Import the names from XML.

Parameters: in the XML source. The stream is not closed

Returns: the names

Throws: IOException on error

importFromXML

public static HashMap importFromXML(Reader in)
Import the names from XML.

Parameters: in the XML source. The reader is not closed

Returns: the names

Throws: IOException on error

outputNamedDestinationAsNames

public static PdfDictionary outputNamedDestinationAsNames(HashMap names, PdfWriter writer)

outputNamedDestinationAsStrings

public static PdfDictionary outputNamedDestinationAsStrings(HashMap names, PdfWriter writer)

startDocument

public void startDocument()

startElement

public void startElement(String tag, HashMap h)

text

public void text(String str)

unEscapeBinaryString

public static String unEscapeBinaryString(String s)