Free Support Forum - aspose.com

Some PDF's getting damaged upon placing signature image

Hi,

We use aspose.total for Java to get candidates signatures on the employment offer. However a small percentage of the documents are getting damaged at the stage when the candidate accepts and signs our offer letter in PDF format. I am attaching one such file, prior to signatures. We are unable to open the file after signatures. (I am unable to attach the file after signatures, the error message says “Sorry, the file you provided is empty”, and correctly so as the file size is 0 bytes).

Can you suggest a reason why and how this could happen?

RegardsDocBeforeSignatures.pdf (148.1 KB)

@Batrinux

Thank you for contacting support.

Would you please create a narrowed down sample application reproducing this issue, along with all necessary resources, so that we may investigate it further. Moreover, you may create a ZIP of the file which is not attaching, or you can upload it to Google Drive, Dropbox etc. Before sharing requested data, please ensure using Aspose.PDF for Java 18.6 in your environment.

Pls find the files attached in a zip folder. The names of the files are self explanatory. Pls let me know if you need anything else.FileGettingDamaged.zip (139.9 KB)

@Batrinux

The PDF document DocAfterSignatures.pdf is a zero KB file which probably is caused because of some problem in the code or Document.save method does not execute fine. Would you please share a narrowed down sample application along with all necessary resources so that we may investigate further to help you out. Before sharing requested data, please ensure using Aspose.PDF for Java 18.7 in your environment.