114115116117118119120121
protected void endPage(PDPage page) throws IOException { try { handler.endElement("p"); handler.endElement("div"); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to end a page", e); } }
123124125126127128129130131
@Override protected void writeString(String text) throws IOException { try { handler.characters(text); } catch (SAXException e) { throw new IOExceptionWithCause( "Unable to write a string: " + text, e); } }
133134135136137138139140141
@Override protected void writeCharacters(TextPosition text) throws IOException { try { handler.characters(text.getCharacter()); } catch (SAXException e) { throw new IOExceptionWithCause( "Unable to write a character: " + text.getCharacter(), e); } }
143144145146147148149150151
@Override protected void writeWordSeparator() throws IOException { try { handler.characters(" "); } catch (SAXException e) { throw new IOExceptionWithCause( "Unable to write a space character", e); } }
153154155156157158159160161
@Override protected void writeLineSeparator() throws IOException { try { handler.characters("\n"); } catch (SAXException e) { throw new IOExceptionWithCause( "Unable to write a newline character", e); } }
110111112113114115116117
@Override protected void startDocument(PDDocument pdf) throws IOException { try { handler.startDocument(); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to start a document", e); } }
119120121122123124125126
@Override protected void endDocument(PDDocument pdf) throws IOException { try { handler.endDocument(); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to end a document", e); } }
128129130131132133134135136
@Override protected void startPage(PDPage page) throws IOException { try { handler.startElement("div", "class", "page"); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to start a page", e); } writeParagraphStart(); }
193194195196197198199200
} } } handler.endElement("div"); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to end a page", e); } }
209210211212213214215216
assert !inParagraph; inParagraph = true; try { handler.startElement("p"); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to start a paragraph", e); } }