We are using aspose.total for java with coldfusion. I have a link in the PDF file which points to a web page. My requirement is to replace that link with an image. I am using the addImage method of class com.aspose.pdf.facades.PdfFileMend. The image is put above the link using the coordinates of the link. However, when you hover over the image, the link is still shown.
How can I replace the link so that the link totally disappears rather than hiding it by putting the image on top of it?
Please find the attached PDF file. Pls look at the bottom of the page on the left side where the signatures are placed. The signatures are placed over the link “Click here to sign” and the link pointed to the page where the user could sign the document. Once I have put the signature image on top of the link, the link gets hidden but when you hover over it you’ll notice that the area where the link used to exist and the mouse changes to a cursor. I need to totally remove that link and then put the signature image at the position.
Also I am placing the signature image using the llx, lly, urx, ury coordinates of the text that is to be replaced, however when I place the image at those coordinates, the signature image appears above the text and not over it. I had to do a -20 to the lly coordinate to move the signatures over the link, the llx coordinate seems to be ok. Is there some issue with the coordinates being read and when something is placed at such coordinates using aspose?
Please find the input file and the signature file attachments. The PDF attached is the input PDF. In the first step, we fill out all the placeholders like [CandidateFullName], [Address] etc. in the input PDF with actual values from the database. We store the llx and lly coordinates of the text “[CandidateSignature]” in the database. We then replace the “[CandidateSignature]” with a link “Click here to sign”. The following PDF is generatedTelnet PERM Exempt Offer (NO Retention W PDM) Template [Template]2_Filled.pdf (161.8 KB).
Later when the candidate has signed the document we generate the filled and signed document and place the signatures (attached file above) at the coordinates which were stored earlier. However we have to do a lly-20 to place the signatures at the correct location otherwise the signatures appear above the line “Click here to Sign”. This filled and signed PDF was attached in the earlier response.
Hope this helps. Pls let me know if anything else is needed as well.
I have translated the code to ColdFusion. However I am getting an error on the line <cfset page.getContents().add(operator.GSave())>. The error says method GSave cannot be found in class Operator.
Did you try the latest version 17.12 of Aspose.Pdf for Java API? If not, then please download and try the latest version, and then let us know how that goes into your environment.
The GSave method was not found. Either there are no methods with the specified method name and argument types or the GSave method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity.
The error occurred on line 131.
This might due to the naming conflict of the class, e.g. the class becomes part of any other package. Please take a look over this Stack overflow thread: Method was not found, Coldfusion 11, CreateObject
Kindly send all details of the ColdFusion environment, so that we could replicate the same error. Your response is awaited.
While instantiating the class I am specifying the full package name i.e. “com.aspose.pdf.Operator”. And then I am invoking the GSave() method of the “operator” object. Is “GSave” really a method because the aspose documentation says something about it being a extended class.
We are using ColdFusion 11,0,10,300066 on a windows 2012 server with SQL server as the database. Awaiting your response.
Thank you for the details. We are preparing a ColdFusion environment and will let you know for further details. Please spare us a little time and we will get back to you in the next week.