LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 02-28-2005, 01:56 PM   #16
mooreted
Member
 
Registered: May 2003
Posts: 598

Original Poster
Rep: Reputation: 30

Thanks. Strange. I'll give that a try.
 
Old 02-24-2010, 04:12 AM   #17
zmi007
LQ Newbie
 
Registered: Nov 2007
Posts: 2

Rep: Reputation: 1
http://www.demko.ca/notes/200610_pdf_ps_hacking.html


Introduction
============

"Encrypted" PDFs produce postscript files that have little traps
in them making them only printable, and not re-distillable.
This is annoying.

To de-trap these .ps files and make them distillable again, do the following:

Searching hints
===============

All the blocks have something like this:

% Removing the following BLAH lines is illegal, subject to the Digital Copyright Act of 1998.

Also note, the hexdecimal contents might not match exactly.

Type 1 Blocks
=============

Find all:

mark currentfile eexec
54dc5232e897cbaaa7584b7da7c23a6c59e7451851159cdbf40334cc2600
30036a856fabb196b3ddab71514d79106c969797b119ae4379c5ac9b7318
33471fc81a8e4b87bac59f7003cddaebea2a741c4e80818b4b136660994b
18a85d6b60e3c6b57cc0815fe834bc82704ac2caf0b6e228ce1b2218c8c7
67e87aef6db14cd38dda844c855b4e9c46d510cab8fdaa521d67cbb83ee1
af966cc79653b9aca2a5f91f908bbd3f06ecc0c940097ec77e210e6184dc
2f5777aacfc6907d43f1edb490a2a89c9af5b90ff126c0c3c5da9ae99f59
d47040be1c0336205bf3c6169b1b01cd78f922ec384cd0fcab955c0c20de
000000000000000000000000000000000000000000000000000000000000
cleartomark

And delete the blocks.

Type 2 Blocks
=============

Find all:

currentfile eexec
6ebb4949d640ad13b78a1bb8e40ddda64d5017a356a3e054d4e1051a6bef
a74a655154d80bc1e572a832e3a113270ca21bc7f22bb0d921288f9fdb1b
65980fc8986fd90f583455f2d67b7cddc1be414b1a01e4209d1c1e5a5ece
e16abdf9dc96d5b3286d08b880b27069f230eb17c6f5ffc4c814730800a2
858b048265b04bc3145f63150f12ba7b03c273e367942289c4c00caeea46
233185aa941a68a65553e43f51aef1632b74d2d237320932e572ba2c9a0e
c068f285c48e9bdb0d645fbd86fb46c8cb99f2bb0d2d4db8b8d8f6be99f2
3f38cd9d077436b46d5e5048bcf0f4eb0c79c842bb074e92be0717220322
6641d3dbc7cda5576ac556416da0051814c2705e

And REPLACE each block with:

PDFVars begin PDF begin PDFVars/InitAll get

Research Notes
==============

Type 1 blocks decrypt (via the eexect command) to:

/currentdistillerparams where { pop /pdfmark where
{pop (This PostScript file was created from an encrypted PDF file.\n)
print
(Redistilling encrypted PDF is not permitted.\n) print
userdict /quit get exec }if} if
currentfile closefile

(fully enclosed, hense deletable outright)

Reference, see Q2.6 in the comp.text.pdf faq:
http://www.stillhq.com/ctpfaq/2001/c...aq-2001-02.txt

Type 2 blocks decrypt to:

/currentdistillerparams where { pop /pdfmark where
{ pop (The owner of this file does not permit its conversion\
to PDF.)print quit}if }if
end PDFVars begin PDF begin PDFVars/InitAll get
currentfile closefile

(yet you need the pdfvar stuff, so that needs to be spliced out)

Reference:
http://www.ghostscript.com/pipermail...ry/000233.html

A handy postscript reference:
http://atrey.karlin.mff.cuni.cz/~mil...nce/PSL2e.html

the end -- alexd -- Oct 13, 2006 -- version 1.0
 
Old 01-02-2012, 03:11 AM   #18
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 508

Rep: Reputation: 47
Quote:
Originally Posted by zmi007 View Post
Type 1 Blocks
=============

Find all:

mark currentfile eexec
54dc5232e897cbaaa7584b7da7c23a6c59e7451851159cdbf40334cc2600
30036a856fabb196b3ddab71514d79106c969797b119ae4379c5ac9b7318
33471fc81a8e4b87bac59f7003cddaebea2a741c4e80818b4b136660994b
18a85d6b60e3c6b57cc0815fe834bc82704ac2caf0b6e228ce1b2218c8c7
67e87aef6db14cd38dda844c855b4e9c46d510cab8fdaa521d67cbb83ee1
af966cc79653b9aca2a5f91f908bbd3f06ecc0c940097ec77e210e6184dc
2f5777aacfc6907d43f1edb490a2a89c9af5b90ff126c0c3c5da9ae99f59
d47040be1c0336205bf3c6169b1b01cd78f922ec384cd0fcab955c0c20de
000000000000000000000000000000000000000000000000000000000000
cleartomark

And delete the blocks.
So basically this command executes whenever gs or another PostScript manipulating program tries to do something that apparently violates the copy protection. I figured PostScript didn't have advanced copy protection, I just couldn't figure out where in the file it was implemented. Thanks
 
  


Reply



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
Print-to-file print driver to print PDF Bill Fox Linux - General 3 05-02-2006 04:15 PM
evince doesn't print PDF files correctly polemon Linux - Software 0 11-22-2005 04:16 PM
why I can't print PDF files wannaluvlinux Linux - Software 3 10-13-2004 02:52 AM
print files in PDF or html format from the linux command line IBKnobel Linux - Software 3 07-12-2004 09:29 PM
KGhostView doesn't print pdf files finrold Linux - Software 0 11-26-2003 05:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 06:54 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration