My pdf file will have an area with the text "Sign here". It could be anywhere in the pdf(i.e. the coordinates for that area is not defined) . I would like to add the signature over that given area or text(eg "Sign Here") in my pdf file. In the given code http://developer.arx.com/quick-start/sapi-web-services/#t-helloworld , how can I achieve this?
Asked
Active
Viewed 471 times
1 Answers
1
You need to know which page, and where on the page, the graphical part of the digital signature should be placed.
One way to determine the location dynamically is to add a "Signature Field Locator." In the original PDF you include a special Field Locator text string such as <<<w=100;h=120;n=employee;a=1;>>>
You set the Field Locator text color to be the same as the page's background color so it won't show when the pdf is viewed.
CoSign Signature Local includes methods for locating and using Field Locators to set the position of a graphical signature. See the example program.

Larry K
- 47,808
- 15
- 87
- 140
-
Thanks, Do you have any code for Java Framework 1.6? I am having one more question, Is there any way to replace text (any text eg "sign here") on our Pdf, instead of writing "<<
>>" in our Pdf file. – mushir2007 Jun 30 '14 at 12:34 -
Can you please share the java packages used for the code. – mushir2007 Jul 01 '14 at 05:45
-
Hi, have you found the code compatible to java 1.6? – mushir2007 Jul 07 '14 at 10:43
-
We don't have anything currently, sorry – Larry K Jul 08 '14 at 13:23
-
Hi, Do you have the java packages used for the provided C# code. Can you share those java packages? – mushir2007 Jul 15 '14 at 12:20
-
Please re-submit your comment as a new question to StackOverflow. (And include the cosign-api tag.) Comments should not be used as an extended dialog. Thanks. – Larry K Jul 15 '14 at 20:12
-
I have done it, please have a look into it http://stackoverflow.com/questions/24777795/how-to-sign-a-pdf-file-using-field-locators-using-java-including-its-necessary-j – mushir2007 Jul 16 '14 at 09:59