LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 03-13-2006, 01:49 PM   #1
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Rep: Reputation: 30
'Hacking a PDF'


Hi.

I am not a programmer at all, and I'm not sure if this question is allowed... but I must ask.

http://www.linuxquestions.org/questi...d.php?t=423675

That thread describes my problem, but I'll sum it up quickly.

I bought an ebook from an ebook store.

Firstly it downloaded a file called ebx.etd...which wouldn't open in linux. So I ran it over to a friends windows computer, opened it in adobe reader for windows and it worked. It downloaded the pdf, so I was happy. I burnt it, brought it home, and tried opening it..yet it STILL wouldn't work.

Apparently the pdf file was created with 'DRM security', which is supported only on the WINDOWS client, but not the LINUX. The requirements that were listed on the ebook provider were 'adobe reader 6.0 or higher'...so I thought that was excellent, since linux is up to 7.0.6 . After reading, as I said, I found out that even on the same version for linux as windows, it is not supported in linux. I think that's horribly unfair, and I just wasted money.

Anyway, I was wondering if their was anyway to 'bipass' the security. I tried hexing it (haha)...but didnt get too far. I actually got it to open, but it all was blank.

Any help apreciated.
 
Old 03-13-2006, 02:18 PM   #2
Mega Man X
Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 63
Can't you return the book? They should have some sort of return policies. If, however, the supported/required system clearly described that it would not work with Linux, there's little you can do :\.

There's a very interesting project that can convert a pdf to a word doc. That may save you the trouble:

http://www.investintech.com/

There're similar ones(even free), that can convert pdf's to plain text. Works fine, but if the images on the book are important you will be, once again, in trouble

http://www.verypdf.com/pdf2txt/pdf2txt.htm

http://www.download.com/Easy-PDF-to-...-10349874.html

Those alternatives would most likely be easier than trying to bypass some security measures they did on the pdf file, I think
 
Old 03-13-2006, 03:33 PM   #3
Dave Kelly
Member
 
Registered: Aug 2004
Location: Todd Mission Texas
Distribution: Linspire
Posts: 213

Rep: Reputation: 31
Try the stuff that Mega Man suggests. If no joy there, there is a whole slew of utilities for converting PDF to othere formats. I'll post a list of what I have at the bottom of this message so you will have some idea of what to look for if you need to search google.

Also don't overlook the 'convert' application in 'Imagemagick Suite'. Also run your ebook through "Open Office 2".

Quote:
SilverNail:~# apropos pdf
dvipdf (1) - Convert TeX DVI file to PDF using ghostscript and dvips
foomatic-ppdfile (1) - Generate a PPD file for a given printer/driver combo
gs (1) - Ghostscript (PostScript and PDF language interpreter and previewer)
gs-esp (1) - Ghostscript (PostScript and PDF language interpreter and previewer)
gs-gpl (1) - Ghostscript (PostScript and PDF language interpreter and previewer)
gsnd (1) - Run ghostscript (PostScript and PDF engine) without display
htdig-pdfparser (1) - parse a PDF document (wrapper script for htdig)
kghostview (1) - KDE PS/PDF Viewer
pdf2dsc (1) - generate a PostScript page list of a PDF document
pdf2ps (1) - Ghostscript PDF to PostScript translator
pdffonts (1) - Portable Document Format (PDF) font analyzer (version 3.00)
pdfimages (1) - Portable Document Format (PDF) image extractor (version 3.00)
pdfinfo (1) - Portable Document Format (PDF) document information extractor (version 3.00)
pdfopt (1) - Ghostscript PDF Optimizer
pdftops (1) - Portable Document Format (PDF) to PostScript converter (version 3.00)
pdftotext (1) - Portable Document Format (PDF) to text converter (version 3.00)
ps2ascii (1) - Ghostscript translator from PostScript or PDF to ASCII
ps2pdf (1) - Convert PostScript to PDF using ghostscript
ps2pdf12 (1) - Convert PostScript to PDF 1.2 (Acrobat 3-and-later compatible) using ghostscript
ps2pdf13 (1) - Convert PostScript to PDF 1.3 (Acrobat 4-and-later compatible) using ghostscript
ps2pdfwr (1) - Convert PostScript to PDF without specifying CompatibilityLevel, using ghostscript
pstotext (1) - extract ASCII text from a PostScript or PDF file
texi2dvi4a2ps (1) - Compile Texinfo and LaTeX files to DVI or PDF
tiff2pdf (1) - convert a TIFF image to a PDF document
update-xpdfrc (8) - program to generate xpdf's configuration file
xpdfrc (5) - configuration file for Xpdf tools (version 3.00)
gv (1x) - a PostScript and PDF previewer
SilverNail:~#
 
Old 03-13-2006, 04:15 PM   #4
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
There's also an option in Win Acroread (the adobe reader) to save a copy. Maybe if someone didn't do their homework, the saved copy won't be DRM-protected.

There are several PDF readers for linux: xpdf, gv, xv(?) and adobe. I happen to like the adobe one best, as much as I hate to admit it, but in a pinch like now, those other ones should be worth trying- they sure don't support DRM.
 
Old 03-13-2006, 06:35 PM   #5
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Mega Man X
Can't you return the book? They should have some sort of return policies. If, however, the supported/required system clearly described that it would not work with Linux, there's little you can do :\.

There's a very interesting project that can convert a pdf to a word doc. That may save you the trouble:

http://www.investintech.com/

There're similar ones(even free), that can convert pdf's to plain text. Works fine, but if the images on the book are important you will be, once again, in trouble

http://www.verypdf.com/pdf2txt/pdf2txt.htm

http://www.download.com/Easy-PDF-to-...-10349874.html

Those alternatives would most likely be easier than trying to bypass some security measures they did on the pdf file, I think
Hey thanks for the suggestions!

So far no luck, all of them tell me that the file is encrypted ;(.

Thanks though!
 
Old 03-13-2006, 07:06 PM   #6
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 50
DRM, capitalism, email charges, ... what on earth is the world coming to? Wherever it is, I don't want to be there.

Anyway, It takes no more than 30s of googling(I love the fact that people recognise google as a verb!) to find lots of info and utilities for decrypting PDFs. I can't remember the forum policies, and am too tired to look them up so I won't post links. But needless to say there is a patch for xpdf out there to allow printing. At which point one could convert the printed postscript back to an unencrypted pdf with the above tools/utilities.
 
Old 03-14-2006, 03:16 PM   #7
Mega Man X
Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 63
I have to agree with kev82 here. This kind of trouble that we have to face makes me sad. PDF means Portable Document Format for crying out loud. Still, they put some fancy protection on it . What makes me even more sad is the fact that peoples who did not pay for that pdf, most likely can use it without a problem. Same goes for peoples buying games: So many copy protections, CD-key protections, Play with CD-on drive, crappy applications like Steam... while peoples cracking it can play Online without problems connecting to a server to allow you to play among other annoyances. I bet those crackers even laugh at us :\

Well, try kev82 suggestions. If everything else fails, see if you can find the pdf on some p2p. Since you've paid for it, you won't feel like you are doing something wrong, I guess

Last edited by Mega Man X; 03-14-2006 at 03:18 PM.
 
Old 03-14-2006, 03:20 PM   #8
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
You can always just run Acrobat/Reader through Wine...
 
Old 03-14-2006, 05:30 PM   #9
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Original Poster
Rep: Reputation: 30
Hey thanks for suggestions. No luck still .

@Scuzz, I can only get 5.0 to run properly with wine. I have to have 6.0 or higher to have the DRM functionality. I actually did get it to install...6.0...but the program itself doesn't display fully. Also, I can't seem to 'activate' adobe 6.0 from wine...which is also ANOTHER requirement to view this PDF. I get an error that it cannot find the adobe activator.
 
Old 03-14-2006, 06:19 PM   #10
Dave Kelly
Member
 
Registered: Aug 2004
Location: Todd Mission Texas
Distribution: Linspire
Posts: 213

Rep: Reputation: 31
Quote:
Originally Posted by RoaCh Of DisCor
Apparently the pdf file was created with 'DRM security', which is supported only on the WINDOWS client, but not the LINUX. The requirements that were listed on the ebook provider were 'adobe reader 6.0 or higher'.
This sound like a another case of MS not playing nice. Didn't I read recently of instances like this where MS has created their own version of PDF.

I think I would complain sternly to the source you bought from about their documents conforming to the PDF standard.
 
Old 03-14-2006, 07:36 PM   #11
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Original Poster
Rep: Reputation: 30
I am, haha. Although, the person is like talking to a brick wall. They just paste worthless information on how to open the PDF in windows like I'm stupid. I've explained it, but they don't seem to get it. None the less I decided to install windows with vmware, and use that for now...even if it's incredibly slow. I wish there was a way to read it in linux, but it doesn't seem so. I can't even print it.
 
Old 03-14-2006, 10:46 PM   #12
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,251

Rep: Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026Reputation: 2026
Apparently some distors eg Gentoo have a compile option to ignore/turn off drm restrictions:
http://ask.slashdot.org/askslashdot/...4/209206.shtml
"But some gentoo ebuilds do, indeed, have USE flags that aren't just ./configure flags for some applications. For example, you can install xpdf with the 'nodrm' use flag, which applies a patch to cause xpdf to ignore drm restrictions."
http://gentoo.linuxhowtos.org/browse...=app-text/xpdf
 
Old 03-15-2006, 07:11 AM   #13
Phyrexicaid
Member
 
Registered: Aug 2004
Location: JHB - South Africa
Distribution: Kubuntu 7.04; openSUSE 10.1
Posts: 176

Rep: Reputation: 30
Why not download pdfcreator http://sourceforge.net/projects/pdfcreator/

That way you can print to this pdf plugin from your friends Windows pc. Perhaps this will solve your problem?
 
Old 09-27-2006, 02:51 PM   #14
PhenuxRizing
Member
 
Registered: Feb 2004
Distribution: Fedora
Posts: 59

Rep: Reputation: 15
You can get windows to convert that encrypted pdf into a postscript file, easily read in any linux distro.

Just follow the directions on this website

http://www.sketchpad.net/postscript-printer-winxp-1.htm

once you print the pdf to file instead of a printer you can transfer that file over to your linux box or you can open it directly in windows if you install ghostscript and ghostscript-viewer. Good luck, hope this helps
 
Old 09-27-2006, 04:37 PM   #15
senyahnoj
Member
 
Registered: Jul 2004
Location: Gloucestershire, UK
Distribution: Ubuntu, Debian & Gentoo
Posts: 74

Rep: Reputation: 16
As per PhenuxRizing's tip - then run the postscript file through ps2pdf on linux to convert it back to a PDF without any crap in it.
 
  


Reply

Tags
encrypted, pdf


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert pdf to html or txt or remaster the pdf? jago25_98 Linux - Software 1 12-13-2005 01:11 AM
Foxit PDF Reader 1.3: A Nice PDF Viewer Cinematography Linux - Software 6 05-03-2005 04:36 PM
How do I unpack pdf.pdf files corbis_demon Linux - General 5 10-29-2004 09:12 PM
Hacking Exposed Wireless Hacking Chapter prompt Linux - Wireless Networking 0 05-08-2004 02:44 PM
Hacking pdf files Mohsen Programming 2 09-15-2003 09:20 AM


All times are GMT -5. The time now is 05:40 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration