Ask a Question related to Adobe Acrobat SDK, Design and Development.
-
Priyanka_Paigude@adobeforums.com #1
Issue while Signing and Encrypting the PDF Document.
Hello,
I am developing one component in VC++(MFC) which signs and encrypts the pdf documents.
When i sign and encrypt pdf document using my component, I am getting following error while opening the document in Adobe Acrobat
------------------------------------
Error during signature verification
Unexpected byte range values defining scope of signed data.
Details: The signature byte range is invalid
------------------------------------
But if i open that document in binary mode and calculate the byte range its looking correct.
The Process for signing and encrypting the PDF document is as follows :
1)Prepare the PDF document for signing (Add Annotation objects,n0,n2
layers,create blank signature field,new xref section etc.)
2)Encrypt the whole document(Password based encryption).
3)Put the ByteRange values.
4)Write the signature in blank signature field.
If i just perform encryption(128 bit RC4 Algorithm) on the pdf document its working fine.Only after adding the signature objects i am getting above error.I think it means something is wrong in signature related objects,but i am not able to recognize the exact problem.
So what can be the issue?
Please Help
Thanks in Advance
Priyanka
Priyanka_Paigude@adobeforums.com Guest
-
Signing and saving a document in Acrobat 8.0
We would like to bypass the sign and save As dialog which appears when 1. Sign a document 2. click on Sign Is there any way we could acheive this -
Programmatically signing a PDF document
Hi, i'm trying to develop a VB application to add digital signature to a PDF Document. It's going to run on a desktop environment, with full... -
PDF document signing form .Net
Hi, I have to create a .net library that signs pdf documents. Could anyone give me some advice how to achieve this? Any code example or maybe... -
Creating Word Document Issue
Hi all, trying to create word document using following syntax in c# private Word.ApplicationClass oWordApp = new Word.ApplicationClass(); ... -
encrypting files with SSH???
in comp.unix.admin i read: i agree that encrypting once would have better performance than doing so multiple times. that doesn't alter my... -
Leonard_Rosenthol@adobeforums.com #2
Re: Issue while Signing and Encrypting the PDF Document.
What signature objects are you adding? the ONLY THING you should be adding is data between < and > for the value of the Contents key.
Leonard_Rosenthol@adobeforums.com Guest
-
Priyanka_Paigude@adobeforums.com #3
Re: Issue while Signing and Encrypting the PDF Document.
In Contents key i am adding hex encoded attached signature(i.e hash of the file and certificate together) ,after encrypting the pdf document and writing the proper values ByteRange array.
And other objects are like AP dictionary,n0,n2 layers....
I have developed two separate components for Encryption and Signing.
They both work properly if do only signing using signing component and only encrypt using encryption component.
But If i combine them their is a problem.
Thanks.
Priyanka_Paigude@adobeforums.com Guest
-
Leonard_Rosenthol@adobeforums.com #4
Re: Issue while Signing and Encrypting the PDF Document.
You need to add EVERYTHING BEFORE encrypting EXCEPT the actual hex encoded value inside the <>.
If you'd like to post a sample PDF that fails, we can take a look.
Leonard_Rosenthol@adobeforums.com Guest
-
Priyanka_Paigude@adobeforums.com #5
Re: Issue while Signing and Encrypting the PDF Document.
yes i am doing the same thing. After encrypting the document i am putting the values in ByteRange array and then hex encoded value in Contents key.
Can u please tell me how can i send u a sample PDF that fails?
Should i send it to following mail ids :
[email]member@adobeforums.com[/email]
[email]adobe.acrobat.sdk@adobeforums.com[/email]
Priyanka_Paigude@adobeforums.com Guest
-
Priyanka_Paigude@adobeforums.com #6
Re: Issue while Signing and Encrypting the PDF Document.
I am sending the Sample Files
blank.pdf file is a original file
<http://www.2shared.com/file/4677649/3f341d92/blank.html>
step 1: I am adding Signing object(without data in Contents<> key) in
blank.pdf file.
Output File is Prepared-blank.pdf
<http://www.2shared.com/file/4677648/48332d04/Prepared-blank.html>
step 2: Sending Prepared-blank.pdf file for encryption.
Output File is SignednEncrypted-blank.pdf which is Encrypted and Signed.
<http://www.2shared.com/file/4677647/d88c3095/SignednEncrypted-blank.html>
Password for opening SignednEncrypted-blank.pdf is : "a".
Please help.
Thanks.
Priyanka_Paigude@adobeforums.com Guest
-
Leonard_Rosenthol@adobeforums.com #7
Re: Issue while Signing and Encrypting the PDF Document.
I opened up SignednEncrypted=blank.pdf in Acrobat 9 and it reports that the signature is fine (albeit, I don't have the certificate in my cert store, so it can't verify identity).
Leonard_Rosenthol@adobeforums.com Guest
-
Priyanka_Paigude@adobeforums.com #8
Re: Issue while Signing and Encrypting the PDF Document.
ohh Great..
Thanks Leonard.
I don't have Acrobat 9,But i checked in Acrobat 6 and Acrobat 8 its showing cross on signature and then gives error.
And issue is i have to make it work on Acrobat 6 and Acrobat 8
so what do i do?
Priyanka_Paigude@adobeforums.com Guest
-
Leonard_Rosenthol@adobeforums.com #9
Re: Issue while Signing and Encrypting the PDF Document.
I am surprised that Acrobat 8 and Acrobat 9 are behaving differently in this regard. Let me check it out...My copy of Acrobat 8 flagged the file as "damaged" and so therefore the recreated bytes don't match.
Acrobat 6, however, is ANCIENT and is no longer supported by Adobe. I can't help you there - other than tell you to not bother and only worry about 8 and 9.
Leonard_Rosenthol@adobeforums.com Guest
-
Priyanka_Paigude@adobeforums.com #10
Re: Issue while Signing and Encrypting the PDF Document.
I checked that file in Acrobat 9 Reader, it is verifying the file properly but not showing any signature details on the document.
I am able to see the details in signature pane only.
But if i Encrypt and Sign the file directly using Acrobat8 and open it in Acrobat 9 i am able to see the details on both Signature pane as well as on page.
In Acrobat 9 are you able to see the signature details on document?
Priyanka_Paigude@adobeforums.com Guest
-
Leonard_Rosenthol@adobeforums.com #11
Re: Issue while Signing and Encrypting the PDF Document.
You have a bunch of problems with the PDF itself - it's not the signature anymore. Look at the content streams, object lengths, font data, etc.
Leonard_Rosenthol@adobeforums.com Guest
-
Priyanka_Paigude@adobeforums.com #12
Re: Issue while Signing and Encrypting the PDF Document.
Sorry Leonard but i am not getting what are the exact problems.
Can you explain it more?
I am able Sign blank.pdf properly
<http://www.2shared.com/file/4679666/7d6215b2/Signed-_blank.html>
And even i can Encrypt blank.pdf properly
<http://www.2shared.com/file/4679665/e46b4408/Encrypted-blank.html>
So whats wrong?
Priyanka_Paigude@adobeforums.com Guest
-
Priyanka_Paigude@adobeforums.com #13
Re: Issue while Signing and Encrypting the PDF Document.
Hi Leonard,
Now I am able to Sign & Encrypt the PDF. My Issue is resolved
Thanks for your help.
Priyanka_Paigude@adobeforums.com Guest



Reply With Quote

