141142143144145146147148
@Override protected void endDocument(PDDocument pdf) throws IOException { try { handler.endDocument(); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to end a document", e); } }
151152153154155156157158
protected void startPage(PDPage page) throws IOException { try { handler.startElement("div", "class", "page"); handler.startElement("p"); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to start a page", e); } }
161162163164165166167168
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); } }
170171172173174175176177178
@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); } }
180181182183184185186187188
@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); } }
7273747576777879
@Override protected void startDocument(PDDocument pdf) throws IOException { try { handler.startDocument(); } catch (SAXException e) { throw new IOExceptionWithCause("Unable to start a document", e); } }
8182838485868788
9192939495969798
101102103104105106107108
110111112113114115116117118