Hi,
There's no connection between the page and the annotation object. Please
look at the AddAnnotations example, that one does this:
List<PDAnnotation> annotations = page.getAnnotations();
annotations.add(...)
There may be more... in your next post, please mention the version.
Tilman
Am 03.04.2015 um 17:19 schrieb phi...@free.fr:
Hello,
I can't make line annotations work. Here's my code.
private void createAnnotation(PDPage pdPage) throws IOException {
PDAnnotationLine line = new PDAnnotationLine();
float[] floatArray = { 30f, 700f, 204f, 700f };
line.setLine(floatArray);
PDGamma colourRed = new PDGamma();
colourRed.setR(1);
line.setColour(colourRed);
BoundingBox box = new BoundingBox(0f, 750f, 0f, 750f);
PDRectangle rect = new PDRectangle(box);
line.setRectangle(rect);
line.setPage(pdPage);
}
In the generated PDF with a text editor, there isn't any /Type Annot command.
Many thanks.
Philippe
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org