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