Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Cannot open secured PDF
  FAQ FAQ  Forum Search   Register Register  Login Login

Cannot open secured PDF

 Post Reply Post Reply
Author
Message
Soruk View Drop Down
Beginner
Beginner


Joined: 08 Feb 18
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Soruk Quote  Post ReplyReply Direct Link To This Post Topic: Cannot open secured PDF
    Posted: 08 Feb 18 at 3:04PM
Hello,

I have a several secured / protected PDF files, and I'm not able to open theses files using C# wrapper and the following methods:
  • DAOpenFileReadOnly
  • DAOpenFile
  • LoadFromFile

I do not know the password and therefore to these functions the password is set to "".
And I got the following code error: 404 - INVALID_PASSWORD_CODE_ERRORS.

I do not understand why Debenu PDF cannot open these files, although Google Chrome, Edge and other PDF Readers (PDF X-Change Viewer, Windows 10 Reader) do not have any problem with opening theses files.

Why your library cannot open these files (I'm using the letest version).

Regards
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 2734
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 08 Feb 18 at 6:37PM
Hi Soruk,

there are two types of passwords:
1. The user password (you have toinsert it while opening the pdf in a reader).
2. The -not very safe- main password to protect some settings inside the pdf.
I think you're talking about this main password.
Using the LoadFromFile you have to insert the password as unicode string. I think that this is your problem...
After the load you should check if there's an existing encryption (if there's a password then there's an encryption, too). If so you should call the decrypt-function.

Cheers and welcome here,
Ingo

Cheers,
Ingo

Back to Top
Soruk View Drop Down
Beginner
Beginner


Joined: 08 Feb 18
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Soruk Quote  Post ReplyReply Direct Link To This Post Posted: 08 Feb 18 at 8:38PM
Hi Ingo,

Thanks for your message. 
I think, these are the second types PDF files. 
But how I can insert the password in the “LoadFromFile” funthion that I do not know (actually I set the empty string). 
Other PDF viewers do not ask for the password when opening file. 

Regards,
Soruk


Edited by Soruk - 08 Feb 18 at 8:53PM
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 2734
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 10 Feb 18 at 12:28PM
like i've written...
NOT a string ;-)


Cheers,
Ingo

Back to Top
Soruk View Drop Down
Beginner
Beginner


Joined: 08 Feb 18
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Soruk Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 18 at 12:46PM
Hello Ingo,

I'am using the official Debenu C# wrapper and its fails probably when marshaling the empty string to the C++ DLL.
This kind of PDFs does not work in the Demo application.
I can send you an example of the PDF in private massage or e-mail.

Regards,
Soruk


Edited by Soruk - 20 Feb 18 at 12:48PM
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 2734
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 18 at 5:44PM
Hi Soruk,

you can send the pdf to webmaster *at* pdf-analyzer *dot* com
Please keep in mind that this is a forum mainly for users...
Not the official support page of the publishers.



Cheers,
Ingo

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 2734
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 21 Feb 18 at 10:40PM
Hi,


i've got your mail...
Foxit and Adobe products can open your pdf-files. Please keep in mind that their installations are many, many mb large ;-)
On the other side there's the slim line QuickPDF library...
You know what i wanna tell... ;-)

I've made the same experiences as you did already.
My apps are telling me that there is a main- AND a user-password. That's not true cause Foxit and the Adobe Reader are able to open the pdfs without asking for a password.

If i look inside the pdf-source using Notepad i see some strange objects and constructs...
Using online validators i've got the following two messages:
1. The document doesn't conform to the PDF reference (missing required entries, wrong value types, etc.).
2. Message: Error, cannot read PDF file: Unexpected escaped string.
The other online tools raise similar messages...

My advice:
Send the documents to the official support team.
Perhaps they are able to fix this problem to make QuickPDF showing these malformed pdf-documents.



Cheers,
Ingo

Back to Top
Soruk View Drop Down
Beginner
Beginner


Joined: 08 Feb 18
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Soruk Quote  Post ReplyReply Direct Link To This Post Posted: 22 Feb 18 at 7:07AM

Hi Ingo,

Thanks for your e-mail.

I just contacted Debenu and I hope they will fix this issue soon.

Regards,

Soruk

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 2734
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 23 Feb 18 at 11:42AM
please keep in mind:
These pdf-documents are malformed not always according to the pdf-specs.
A 100 mb installation of an acrobat reader can fix this on the fly - a fast but slim line QuickPDF library not always ;-)

Cheers,
Ingo

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store