| Modifier and Type | Class and Description |
|---|---|
| private static class | PDFText2Markdown.
A helper class to maintain the current font state. |
| Modifier and Type | Field and Description |
|---|---|
| private final PDFText2Markdown. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| protected void | endArticle()
Overrides org. Write out the article separator. |
| private static String | |
| protected void | startArticle(boolean
true if direction of text is left to right isLTR)Overrides org. Write out the article separator with proper text direction information. |
| protected void | writeParagraphEnd()
Overrides org. Writes the Markdown paragraph end 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 Markdown 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 Markdown characters. |
| fontState | back to summary |
|---|---|
| private final PDFText2Markdown. | |
| PDFText2Markdown | back to summary |
|---|---|
| public PDFText2Markdown() 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.
| |
| escape | back to summary |
|---|---|
| private static String escape(String chars) Escape some Markdown characters. | |
| startArticle | back to summary |
|---|---|
| protected void startArticle(boolean isLTR) throws IOException Overrides org. Write out the article separator with proper text direction information.
| |
| writeParagraphEnd | back to summary |
|---|---|
| protected void writeParagraphEnd() throws IOException Overrides org. Doc from org. Writes the Markdown paragraph end 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 Markdown 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 Markdown characters.
| |
Responsible for applying Markdown formatting based on font properties. Supports bold and italic text based on font descriptors.
| 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 Markdown formatting.Closes all open Markdown formatting. |
| 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 Markdown formatting.
| |
| 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) | |