Baer wrote:
> 1.) Is there a better way than replacing a placeholder image? Are there some
> limitations, which make this approach impossible?
OpenOffice is capable of creating PDFs that are forms (AcroForm).
Instead of an Image, you should use a Button. There's on Open Office
conference in Brussels on June 10; I'll be presenting a demo on how
to use OO in combination with iText during the break.
As soon as I've finished my sample code, I'll put it online.
> 2.) How can I get the page/position/size of the placeholder in order set the
> location for the signature?
iText is perfectly capable of finding the position of that button.
AcroFields form = reader.getAcroFields();
float[] positions = form.getFieldPositions(key);
for (int i = 0; i < positions.length; ) {
System.out.print("Page: " + positions[i++]);
System.out.print(" [ " + positions[i++]);
System.out.print(", " + positions[i++]);
System.out.print(", " + positions[i++]);
System.out.print(", " + positions[i++]);
System.out.println(" ]");
}
You can use those positions to add your signature.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar