pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikos Chantziaras <rea...@gmail.com>
Subject Saving PDFHighlighter selection to PDF
Date Mon, 17 Feb 2014 11:09:52 GMT
Hello.

It is not apparent how to save a PDF after I highlight some text in it. 
For example:

   PDDocument doc = PDDocument.load("source.pdf");
   PDFHighlighter hl = new PDFHighlighter();
   java.io.FileWriter xml = new java.io.FileWriter("tmp.xml");
   hl.generateXMLHighlight(doc, "450", xml);

How do I now save source.pdf (or a copy of it, if overwriting is not 
possible) with the text highlighted?

Mime
View raw message