Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
Ho to convert encrypted pdf to text?. I have tried itextsharp, but its not decryting the data. But the text is totally readable in Adobe Reader without any extra settings.
Posted 15-Feb-13 5:30am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This CodeProject article, with comments to it, is an evidence of that fact that people can extract text from PDF even with iTestSharp: Extract Text from PDF in C# (100% .NET)[^].
 
Please try it, too. Pay attention for the code shown in the post "Alternative solution" (and replies) of the "Comments and Discussions" section.
 
—SA
  Permalink  
Comments
bidyut12345 at 15-Feb-13 14:28pm
   
Thank you Sergey Alexandrovich,
I have tried your solution, but its not doing the job.

Please check the pdf.
https://docs.google.com/file/d/0B_h880AcMzAtQXpPNkQyaUlSU2M/edit?usp=sharing
Sergey Alexandrovich Kryukov at 15-Feb-13 14:32pm
   
Do you understand that you asked for pure text, which means that the structure (such as alignment) it totally lost? Did you get any text at all?
—SA
bidyut12345 at 15-Feb-13 14:36pm
   
Yes, sir.
I just want all the text to read it.
But when i extract it using itextsharp it gives me (Page 1 last lines)
 
--------------------------------------------------------------------
 
For Disclosure, Privacy Act, and Paperwork Reduction Act Notice, see separate instructions.
 
Form 1040A (2012)
 



     
     
     
- / 2 ! , % 3
  
 
   
 
   3  %  3 4 2 % % 4

/ 3 # ! 2 5 2 ) % ,
2 / 1 5 % - / 2 ! , % 3
  
 
    3 O N
 
- ) !
2 % 3 % . $ ) : - / 2 ! , % 3
  
 
    $ A U G H T E R
 
- ! 2 # / ! . 4 / . ) !
2 % 3 % . $ ) :
0 2 5 $ % . 4 %
  
 
    / T H E R
! $ ) , % . %
3 ! . 4 ! 2 / 3 ! # !     
BAA
REV 01/28/13 TTW
--------------------------------------------------------------------
 
So, i need it in original format.
bidyut12345 at 15-Feb-13 14:37pm
   
And with your solution i was unable to find these lines in the result. (Not present in the resultant text)
bidyut12345 at 15-Feb-13 14:39pm
   
The result should be like this
------------------------------------------------------------
For Disclosure, Privacy Act, and Paperwork Reduction Act Notice, see separate instructions. Form 1040A (2012)
1
2
4
15,707.
15,707.
15,707.
MORALES 960-87-5148
446 S.E. STREET
1
OSCAR URIEL ROQUE MORALES 606-29-9849 Son
MIA RESENDIZ MORALES 606-67-5422 Daughter
MARCO ANTONIA RESENDIZ-PRUDENTE 975-75-6511 Other
ADILENE
SANTA ROSA CA 95404
BAA
REV 01/28/13 TTW
------------------------------------------------------------

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 499
1 Nirav Prabtani 298
2 OriginalGriff 215
3 _Amy 165
4 Abhinav S 160
0 OriginalGriff 7,755
1 Sergey Alexandrovich Kryukov 6,951
2 Maciej Los 3,994
3 Peter Leow 3,698
4 CHill60 2,742


Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100