Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - How to Decode text in password protected PDF?
  FAQ FAQ  Forum Search   Register Register  Login Login

Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

How to Decode text in password protected PDF?

 Post Reply Post Reply
Author
YogiYang View Drop Down
New Member
New Member
Avatar

Joined: 23 Sep 2019
Points: 5
Post Options Post Options   Quote YogiYang Quote  Post ReplyReply Direct Link To This Post Topic: How to Decode text in password protected PDF?
    Posted: 09 Oct 2019 at 5:52am
Hello,

I am using following code to try to extract text from PDF file. The file in question is password protected.

------------ CODE ----------------
QP := TDebenuPDFLibrary1612.Create;
if QP.LoadFromFile(OpenImageEnDialog1.FileName, UserPass) = 1 then
begin
AllTxt := TStringList.Create;
if AllTxt.Count > 0 then
begin
for I := 0 to AllTxt.Count - 1 do
begin
  if AllTxt <> '' then
    ShowMessage(AllTxt);
end;
end;
end;
------------ CODE ----------------


What I am getting as output from above code is as follows:

/Contents <08AAA42C4BD13A535D0D33EB59ABCBFAD41CFDEC0FD84BA2D612BDBFA7625BD7FC5C3934D8843CC5D64FBBB7820DBEE59D64629DAF062A8FB5D6F58FEA64A708B29C6197DBA205CEA0039FC3A249A7399C155D82529A007481E30897146995656E2319A38E3D6D3759A39FC24BBFCDF5D0B7C23A7FDA5A7E65BA161195D752182A0B68261EA28309087277E5852F70492864F07B1EDCAB50AE3CA3FDC7A8322C26B2D2A8D77D86C33632AA1739CCCE224D86272CB4D43D05F4E300C9141A01FFED2FAC92CC466252AA5DEE7C9197092A57BCA6E4FDA4B232FCA7C50BDCD30255232F5561E80E9B4667D1CAB8AB2E7B55D1F2CCEC9C6A10C9C06118DAC93CEB35BF0204BD>
/Type /Sig
/SubFilter /adbe.x509.rsa_sha1
/Name (DS UNIQUE IDENTIFICATION AUTHORITY OF INDIA 02)
/M (D:20170316122640+05'30')
/ByteRange [ 0 253640 254162 7808 ]
/Cert (0‚…0‚m S[u&0\r\t*†H†÷\r

As you can see the text is encoded,.

How can I decode it?

TIA


---
Yogi Yang
Back to Top
gkaiseril View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Location: USA
Points: 4115
Post Options Post Options   Quote gkaiseril Quote  Post ReplyReply Direct Link To This Post Posted: 09 Oct 2019 at 3:01pm
Remove the password protection.

The creator has password protected their work for a reason. Do you work for free?
Back to Top
YogiYang View Drop Down
New Member
New Member
Avatar

Joined: 23 Sep 2019
Points: 5
Post Options Post Options   Quote YogiYang Quote  Post ReplyReply Direct Link To This Post Posted: 10 Oct 2019 at 3:29pm
Originally posted by gkaiseril gkaiseril wrote:

Remove the password protection.

The creator has password protected their work for a reason. Do you work for free?

I know that as the file in question is a legal document here in my country. But one can print part of it if and when necessary.

This file in question which is a single page document when rendered comes up properly so there has to be some way to decode the long string.


---
Yogi Yang
Back to Top
BAlheit View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 1116
Post Options Post Options   Quote BAlheit Quote  Post ReplyReply Direct Link To This Post Posted: 11 Oct 2019 at 8:23am
Study the PDF Reference.
Back to Top
YogiYang View Drop Down
New Member
New Member
Avatar

Joined: 23 Sep 2019
Points: 5
Post Options Post Options   Quote YogiYang Quote  Post ReplyReply Direct Link To This Post Posted: 17 Oct 2019 at 6:26am
Originally posted by BAlheit BAlheit wrote:

Study the PDF Reference.

It seem I will have to study the ref material from Adobe. But what is surprising me is that if the file can be loaded and rendered successfully by the SDK why can't we get the content in plain text.


---
Yogi Yang
Back to Top
BAlheit View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 1116
Post Options Post Options   Quote BAlheit Quote  Post ReplyReply Direct Link To This Post Posted: 17 Oct 2019 at 7:19am
Which SDK?
Back to Top
YogiYang View Drop Down
New Member
New Member
Avatar

Joined: 23 Sep 2019
Points: 5
Post Options Post Options   Quote YogiYang Quote  Post ReplyReply Direct Link To This Post Posted: 17 Oct 2019 at 3:12pm
Foxit Quick PDF SDK
---
Yogi Yang
Back to Top
BAlheit View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 1116
Post Options Post Options   Quote BAlheit Quote  Post ReplyReply Direct Link To This Post Posted: 19 Oct 2019 at 10:02am
I can't help with this.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.031 seconds.