Hi Bruno,

thanx for the answer; a button is an excellent placeholder and I get the
position with the code you provided.

Nevertheless, there is one drawback when I place the signature over the
button:

When I open such a pdf document with Acrobat Reader (tried with version
7.0.9), it displays a valid signature. 

When I click on this valid signature it flickers shortly and displays an
INVALID signature because the document was modified after signing.

Since everything worked fine, before I added this modification, I'm sure
that the reason is the button.

I've already tried disabling this button, but this didn't help.
:-(

Is there a way to remove this button by the signing application before the
signature is created?

best regards 

Tom



Bruno Lowagie (iText) wrote:
> 
> 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
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Set-Signature-at-a-particular-position-tp17304458p17462067.html
Sent from the iText - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
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

Reply via email to