1. Menna Pablo Javier
  2. PowerBuilder
  3. Wednesday, 6 March 2024 19:23 PM UTC

Hi,

I have a problem using PDFDocument.

The file I import is electronically signed with Adobe ('File_signed.pdf')

When executing the save() function it gives me an error -25 and the resulting file cannot be opened.

Any idea how to fix it?

 

lpdf_doc = create PDFDocument
lpdf_doc.importpdf('File_signed.pdf')
lpdf_doc.save( 'New_file.pdf' )

Regards

 

Andreas Mykonios Accepted Answer Pending Moderation
  1. Thursday, 7 March 2024 12:57 PM UTC
  2. PowerBuilder
  3. # 1

Hi.

If you were able to modify a signed pdf this would be a security issue. There are programs that will allow you to do that, but they will track changes made after the documents was signed. Also the signature will show you a warning. You have to think how pdf with fields would work. Let say I have a pdf to be signed by two persons. Each one has to fill some fields and then sign. That can be done concurrently. Person (1) fill the appropriate fields and sign the pdf. Person (2) get the pdf, then fills the appropriate fields and sign it. It is possible to check what was the state of the pdf when it was signed by person 1, even after an additional signature was added. Also it is possible to check if something was altered after both persons signed. The last is really important...

As you may understand, a signed document should always indicate and validate it's state based on the signature(s). So the best way to get rid of the signature is to print it. Even in that case, modifications that you could do to your document may be limited. Finally, based on the area you live on, there may be danger of legal implications if altering a signed document.

Finally, I haven't seen any software that offers functionality to remove a signature. Word may be able to convert a signed pdf to a docx, but the result may not be identical to the original file.

Andreas.

Comment
  1. Menna Pablo Javier
  2. Thursday, 7 March 2024 13:13 PM UTC
Thanks for your explanation, Andreas.

I'm going to change the logic to attach them instead of importing them.



Regards
  1. Helpful
  1. John Fauss
  2. Thursday, 7 March 2024 18:42 PM UTC
That's a great reply, Andreas - Nicely done!
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 6 March 2024 19:37 PM UTC
  2. PowerBuilder
  3. # 2

The document is probably locked since you say it was signed by Adobe and therefore cannot be manipulated/imported.

Comment
  1. Menna Pablo Javier
  2. Thursday, 7 March 2024 10:59 AM UTC
Thanks Armeen.

Is there a way to unlock the signed PDF at runtime?

I tried printing the document again to PDF (with the Windows printer) and I can import that resulting file into the PDFDocument object without problems.

But I want to avoid these steps for the user. Do it by code.

Any ideas about it?

Regards
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 7 March 2024 17:41 PM UTC
Andreas answer is correct, and PowerBuilder itself doesn't provide such PDF cracking feature.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.