Am 04.11.2011 07:57, schrieb Wilfling Stefan:
Hi!

Thanks' for the fast answer.

The documentation for the visual signature could be better.
Yes!
The first problem was, that there is no description to create
visible/invisible Signatures with pdfbox.

https://issues.apache.org/jira/browse/PDFBOX-912
At the bottom you will find a zip with an example code. Next time just ask :-)

The InputStream for the visualization expect a prepaired pdf with a
bunch of dictionaries. The pdfbox extract all needed dictionaries and
add it to the document. So you can't just add image bytes or so.
I understand the system behind this (after some hours debugging ;-) ). My problem is, that I didn´t want use two PDF-Libraries (iText + PdfBox).

Yep, I don't want it too, but implementing the visual signature part, is too much work for me.

I think you asking yourself why the visual signature impl. was done so
complicated.
At iText this

My problem was, I haven't enough functionality inside the pdfbox for
creating a table with an image and informations like name, location or reason. So I decide using iText ;-) for creating the visualisation and adding this as InputStream to the pdfbox. Not the best way, but the only
fast solution.
Do you have an example?

Sry, no. The code for creating the visual signature is closed source. But I can try to extract a sample visual signature. So you just would need to pass the file as input stream to the VisualSignature method.

Hope you understand what I meaning. If not, I can try to explain it in
german. :-)
I understand you and I think it´s better to stay at english (maybe
our discussion helps other people).

If someone can implement something like tables in pdfbox, I can rewrite
the implementation and simplify it.
I don´t think that a table is necessary for this.

Maybe not table, but a similar structure. The signature field should use a fixed size. So for example if the user will add an image and his name, the implementation need to resize the image and may be able to wrap the text in a new line, if necessary. So additionaly some font metric calculation is needed.


Kind Regards
Stefan

Best regards
Thomas

Reply via email to