|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.itextpdf.text.pdf.parser.TaggedPdfReaderTool
public class TaggedPdfReaderTool
Converts a tagged PDF document into an XML file.
Field Summary | |
---|---|
protected java.io.PrintWriter |
out
The writer object to which the XML will be written |
protected PdfReader |
reader
The reader object from which the content streams are read. |
Constructor Summary | |
---|---|
TaggedPdfReaderTool()
|
Method Summary | |
---|---|
void |
convertToXml(PdfReader reader,
java.io.OutputStream os)
Parses a string with structured content. |
void |
convertToXml(PdfReader reader,
java.io.OutputStream os,
java.lang.String charset)
Parses a string with structured content. |
void |
inspectChild(PdfObject k)
Inspects a child of a structured element. |
void |
inspectChildArray(PdfArray k)
If the child of a structured element is an array, we need to loop over the elements. |
void |
inspectChildDictionary(PdfDictionary k)
If the child of a structured element is a dictionary, we inspect the child; we may also draw a tag. |
void |
inspectChildDictionary(PdfDictionary k,
boolean inspectAttributes)
If the child of a structured element is a dictionary, we inspect the child; we may also draw a tag. |
void |
parseTag(java.lang.String tag,
PdfObject object,
PdfDictionary page)
Searches for a tag in a page. |
protected java.lang.String |
xmlName(PdfName name)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PdfReader reader
protected java.io.PrintWriter out
Constructor Detail |
---|
public TaggedPdfReaderTool()
Method Detail |
---|
public void convertToXml(PdfReader reader, java.io.OutputStream os, java.lang.String charset) throws java.io.IOException
reader
- the PdfReader that has access to the PDF fileos
- the OutputStream to which the resulting xml will be writtencharset
- the charset to encode the data
java.io.IOException
public void convertToXml(PdfReader reader, java.io.OutputStream os) throws java.io.IOException
reader
- the PdfReader that has access to the PDF fileos
- the OutputStream to which the resulting xml will be written
java.io.IOException
public void inspectChild(PdfObject k) throws java.io.IOException
k
- the child to inspect
java.io.IOException
public void inspectChildArray(PdfArray k) throws java.io.IOException
k
- the child array to inspect
java.io.IOException
public void inspectChildDictionary(PdfDictionary k) throws java.io.IOException
k
- the child dictionary to inspect
java.io.IOException
public void inspectChildDictionary(PdfDictionary k, boolean inspectAttributes) throws java.io.IOException
k
- the child dictionary to inspect
java.io.IOException
protected java.lang.String xmlName(PdfName name)
public void parseTag(java.lang.String tag, PdfObject object, PdfDictionary page) throws java.io.IOException
tag
- the name of the tagobject
- an identifier to find the marked contentpage
- a page dictionary
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |