Re: Saving PDFHighlighter selection to PDF

2014-02-27 Thread Andreas Lehmkühler
Hi, Am 27.02.14 13:05, schrieb Nikos Chantziaras: I suppose it's not possible to convert the jar files into DLLs with ikvmc.exe? I tried that, but there's lots of error messages about missing implementations. Has anyone tried that before? That is exactly what I did. In most cases only the AWT st

Re: Saving PDFHighlighter selection to PDF

2014-02-27 Thread Nikos Chantziaras
I suppose it's not possible to convert the jar files into DLLs with ikvmc.exe? I tried that, but there's lots of error messages about missing implementations. Has anyone tried that before? On 27/02/14 12:32, Andreas Lehmkühler wrote: I'm afraid not. The Website provides an older Version of PD

Re: Saving PDFHighlighter selection to PDF

2014-02-27 Thread Andreas Lehmkühler
I'm afraid not. The Website provides an older Version of PDFBox only as it becomes more difficult to compile a .NET version using IKVM. Maybe you should try to compile your own version using a more recent version if PDFBox. BR Andreas Lehmkühler On 27. Februar 2014 10:55:07 MEZ, Nikos Chantziar

Re: Saving PDFHighlighter selection to PDF

2014-02-27 Thread Nikos Chantziaras
I'm using this: http://pdfbox.lehmi.de I suppose OverlayPDF is not included? On 27/02/14 10:09, Maruan Sahyoun wrote: Hi, if you are using Overlay.java please use OverlayPDF.java instead. Overlay.java will be removed in the next major release. To add some highlight rectangle handling it

Re: Saving PDFHighlighter selection to PDF

2014-02-27 Thread Maruan Sahyoun
Hi, if you are using Overlay.java please use OverlayPDF.java instead. Overlay.java will be removed in the next major release. To add some highlight rectangle handling it yourself you can use PDDocument document = PDDocument.loadNonSeq( ... ); PDPage page = (PDPage) document.getDocumen

Re: Saving PDFHighlighter selection to PDF

2014-02-26 Thread Nikos Chantziaras
That doesn't work, it turns out. Only the test PDFs were working. Trying to overlay "real" PDFs result in an error that Cos Arrays are not supported. So I then tried to use PDF annotations instead. This seemed to work fine. However, when someone tried to print the PDF, annotated text was not h

Re: Saving PDFHighlighter selection to PDF

2014-02-18 Thread Nikos Chantziaras
I will be using C# for this (IKVM), but I'll try and submit a Java example once I have something workable. On 17/02/14 19:29, Maruan Sahyoun wrote: you’re welcome. Maybe you can share a code snippet with us when you’re done - would like to make it part of the documentation. BR Maruan Sahyoun

Re: Saving PDFHighlighter selection to PDF

2014-02-17 Thread Maruan Sahyoun
you’re welcome. Maybe you can share a code snippet with us when you’re done - would like to make it part of the documentation. BR Maruan Sahyoun Am 17.02.2014 um 17:57 schrieb Nikos Chantziaras : > That should work nicely for finding character sequences and constructing > rectangle coordinates

Re: Saving PDFHighlighter selection to PDF

2014-02-17 Thread Nikos Chantziaras
That should work nicely for finding character sequences and constructing rectangle coordinates. Thank you very much for the help! On 17/02/14 17:45, Maruan Sahyoun wrote: Hi, you can take a look at org.apache.pdfbox.examples.util.PrintTextLocations.java which gives you a sample of outputtin

Re: Saving PDFHighlighter selection to PDF

2014-02-17 Thread Maruan Sahyoun
Hi, you can take a look at org.apache.pdfbox.examples.util.PrintTextLocations.java which gives you a sample of outputting the location of individual characters. BR Maruan Sahyoun Am 17.02.2014 um 16:18 schrieb Nikos Chantziaras : > I've come up with a good way to insert color-filled rectangl

Re: Saving PDFHighlighter selection to PDF

2014-02-17 Thread Nikos Chantziaras
I've come up with a good way to insert color-filled rectangles through the use of Overlay (so that they are rendered behind the text instead of the front of it.) However, how do I get the text coordinates? For example, I'd like to get the coordinates for every occurrence of the word "mark me"

Re: Saving PDFHighlighter selection to PDF

2014-02-17 Thread Maruan Sahyoun
Hi, yes, that's old, prior to PDFBox becoming an Apache project. Maruan Sahyoun > Am 17.02.2014 um 14:37 schrieb Nikos Chantziaras : > >> On 17/02/14 15:01, Nikos Chantziaras wrote: >> Do you happen to know why on Linux I can't compile Java source that uses >> pdfbox? >> >> $ javac -classpat

Re: Saving PDFHighlighter selection to PDF

2014-02-17 Thread Nikos Chantziaras
On 17/02/14 15:01, Nikos Chantziaras wrote: Do you happen to know why on Linux I can't compile Java source that uses pdfbox? $ javac -classpath /usr/share/pdfbox/lib/pdfbox.jar pdf.java pdf.java:1: error: package org.apache.pdfbox does not exist Please ignore. It seems that my Linux dist

Re: Saving PDFHighlighter selection to PDF

2014-02-17 Thread Nikos Chantziaras
Ah, thanks for explaining it. I wasn't aware that XML files are supposed to be used by Adobe's software. Do you happen to know why on Linux I can't compile Java source that uses pdfbox? $ javac -classpath /usr/share/pdfbox/lib/pdfbox.jar pdf.java pdf.java:1: error: package org.apache.pdfb

Re: Saving PDFHighlighter selection to PDF

2014-02-17 Thread Maruan Sahyoun
Hi, the XML file is meant to be passed to Adobe Acrobat or Adobe Reader which will take the information and highlight the text accordingly. It’s not something to be saved in the PDF directly. A sample url would look like http://server/myPDF.pdf#xml=myHighlight.xml If you would like to make th

Saving PDFHighlighter selection to PDF

2014-02-17 Thread Nikos Chantziaras
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); H