| Modifier and Type | Class and Description |
|---|---|
| private static class | PDFText2HTML.
A helper class to maintain the current font state. |
| Modifier and Type | Field and Description |
|---|---|
| private final PDFText2HTML. | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| protected void | endArticle()
Overrides org. Write out the article separator. |
| public void | endDocument(PDDocument
The PDF document that is being processed. document)Overrides org. This method is available for subclasses of this class. |
| private static String | |
| protected String | Returns: returns the title.This method will attempt to guess the title of the document using either the document properties or the first lines of text. |
| protected void | startArticle(boolean
true if direction of text is left to right isLTR)Overrides org. Write out the article separator (div tag) with proper text direction information. |
| protected void | startDocument(PDDocument
The PDF document that is being processed. document)Overrides org. This method is available for subclasses of this class. |
| protected void | writeParagraphEnd()
Overrides org. Writes the paragraph end "</p>" to the output. |
| protected void | writeString(String
The text to write to the stream. text, List<TextPosition> the corresponding text positions textPositions)Overrides org. Write a string to the output stream, maintain font state, and escape some HTML characters. |
| protected void | writeString(String
String to be written to the stream chars)Overrides org. Write a string to the output stream and escape some HTML characters. |
| fontState | back to summary |
|---|---|
| private final PDFText2HTML. | |
| INITIAL_PDF_TO_HTML_BYTES | back to summary |
|---|---|
| private static final int INITIAL_PDF_TO_HTML_BYTES | |
| PDFText2HTML | back to summary |
|---|---|
| public PDFText2HTML() throws IOException Constructor.
| |
| appendEscaped | back to summary |
|---|---|
| private static void appendEscaped(StringBuilder builder, char character) | |
| endArticle | back to summary |
|---|---|
| protected void endArticle() throws IOException Overrides org. Write out the article separator.
| |
| endDocument | back to summary |
|---|---|
| public void endDocument(PDDocument document) throws IOException Overrides org. Doc from org. This method is available for subclasses of this class. It will be called after processing of the document finishes.
| |
| escape | back to summary |
|---|---|
| private static String escape(String chars) Escape some HTML characters. | |
| getTitle | back to summary |
|---|---|
| protected String getTitle() This method will attempt to guess the title of the document using either the document properties or the first lines of text.
| |
| startArticle | back to summary |
|---|---|
| protected void startArticle(boolean isLTR) throws IOException Overrides org. Write out the article separator (div tag) with proper text direction information.
| |
| startDocument | back to summary |
|---|---|
| protected void startDocument(PDDocument document) throws IOException Overrides org. Doc from org. This method is available for subclasses of this class. It will be called before processing of the document start.
| |
| writeParagraphEnd | back to summary |
|---|---|
| protected void writeParagraphEnd() throws IOException Overrides org. Doc from org. Writes the paragraph end "</p>" to the output. Furthermore, it will also clear the font state. Write something (if defined) at the end of a paragraph.
| |
| writeString | back to summary |
|---|---|
| protected void writeString(String text, List<TextPosition> textPositions) throws IOException Overrides org. Write a string to the output stream, maintain font state, and escape some HTML characters. The font state is only preserved per word.
| |
| writeString | back to summary |
|---|---|
| protected void writeString(String chars) throws IOException Overrides org. Write a string to the output stream and escape some HTML characters.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private final Set |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: A string that contains the closing tags of all currently open states.Closes all open states. |
| private String | |
| private String | |
| private int | |
| private boolean | |
| private boolean | |
| private String | |
| private String | |
| public String | Returns: A string that contains the text including tag changes caused by its font state.Pushes new |
| protected String |
| stateList | back to summary |
|---|---|
| private final List<String> stateList | |
| stateSet | back to summary |
|---|---|
| private final Set<String> stateSet | |
| FontState | back to summary |
|---|---|
| private FontState() | |
| clear | back to summary |
|---|---|
| public String clear() Closes all open states.
| |
| close | back to summary |
|---|---|
| private String close(String tag) | |
| closeTag | back to summary |
|---|---|
| private String closeTag(String tag) | |
| closeUntil | back to summary |
|---|---|
| private int closeUntil(StringBuilder tagsBuilder, String endTag) | |
| isBold | back to summary |
|---|---|
| private boolean isBold(PDFontDescriptor descriptor) | |
| isItalic | back to summary |
|---|---|
| private boolean isItalic(PDFontDescriptor descriptor) | |
| open | back to summary |
|---|---|
| private String open(String tag) | |
| openTag | back to summary |
|---|---|
| private String openTag(String tag) | |
| push | back to summary |
|---|---|
| public String push(String text, List<TextPosition> textPositions) Pushes new
| |
| push | back to summary |
|---|---|
| protected String push(StringBuilder buffer, char character, TextPosition textPosition) | |