PDFDictpublic abstract class PDFDict extends PDFObject A PDFDict ias a PDFObject that is all, or mostly, a Dictionary. |
Fields Summary |
---|
protected Hashtable | dictThe Dictionary is a HashTable. Put the keys without a
leading slash, since they always have it. Values can
be /names, (strings), or whatever. |
Constructors Summary |
---|
PDFDict(PDF m)
super(m);
dict = new Hashtable();
|
Methods Summary |
---|
protected void | endObj()
master.println("endobj");
| protected void | print()Write the object to the Output Writer. The default implementation
of this method in PDFDict just calls startObj, printDict, and endObj.
startObj();
printDict();
endObj();
| protected void | printDict()
master.println("<<");
Enumeration enum = dict.keys();
while (enum.hasMoreElements()) {
master.print("\t/");
String key = (String)enum.nextElement();
master.print(key);
master.print(" ");
master.print(dict.get(key));
master.println();
}
master.println(">>");
| protected void | startObj()
// Record the starting position of this Obj in the xref table
master.addXref();
// Print out e.g., "42 0 obj"
master.print(master.currObj++);
master.print(" 0 obj");
master.println();
|
|