You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Taariq Levack <ta...@gmail.com> on 2011/05/31 10:06:41 UTC

From iText to PDFBox

Hi

I've been looking at the docs, searching this list, trying a few things out
in the IDE,
and now I know how to handle most of what I need to do to replace iText with
PDFBox.
The following I'm unsure about and would appreciate some hints.

Barcodes: I notice no special packages or classes for this, and I assume
I've either missed it or it's simply solved by getting a barcode image from
elsewhere and adding it to the PDF.
If this is the case, we currently use a button on the PDF which is a
placeholder for the QRCode barcode. Looking at the example AddImageToPDF, I
might get the x & y coordinates from the PDPushButton to drawImage?  How?

Watermark: It seems this isn't supported in the same way either, but I think
it's possible to
have a document with a watermark and then either display or not display it,
that's what I understand anyway.
But isn't this the same story as above, add an image to the doc in a certain
position on every page in the document?
Or is it better done with a PDAnnotation? I've looked at the example code
for annotations but it's not overly obvious how to
handle it the way we did with iText.
I guess I was expecting to iterate over the pages and slip an image in at
(0, 0) of every page or something similar, so it's not really clear yet how
this will work.

Anyway, since we're in control of the template document, we can create the
PDF in whichever way works for PDFBox,
so please tell me how it's best handled.


Best regards,
Taariq