2012年4月10日 星期二

Remove some magic part in Postscript file

之前用過
臨時要用找好久找不太到= =

留個紀錄以免下次又忘了

2.6: What is that stuff inserted into PostScript by Acrobat when printing
encrypted PDFs?

Encrypted PDFs when printed have the following in them:

% Removing the following eight lines is illegal, subject to the Digital
Copyright Act of 1998.
mark currentfile eexec
54dc5232e897cbaaa7584b7da7c23a6c59e7451851159cdbf40334cc2600
30036a856fabb196b3ddab71514d79106c969797b119ae4379c5ac9b7318
33471fc81a8e4b87bac59f7003cddaebea2a741c4e80818b4b136660994b
18a85d6b60e3c6b57cc0815fe834bc82704ac2caf0b6e228ce1b2218c8c7
67e87aef6db14cd38dda844c855b4e9c46d510cab8fdaa521d67cbb83ee1
af966cc79653b9aca2a5f91f908bbd3f06ecc0c940097ec77e210e6184dc
2f5777aacfc6907d43f1edb490a2a89c9af5b90ff126c0c3c5da9ae99f59
d47040be1c0336205bf3c6169b1b01cd78f922ec384cd0fcab955c0c20de
000000000000000000000000000000000000000000000000000000000000

Which stops Distiller from converting to PDF. What is it?

The eexec'd code reads in cleartext:

/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

That means, if either your printer knows about currentdistillerparams
and pdfmark or the PostScript job itself defines these operators (even as
dummies, see note below), this code assumes you are going to re-distill the
PS job which is forbidden.

NOTE:
The PostScript driver you use might insert statements like

/currentdistillerparams where
{pop}
{userdict/currentdistillerparams{1 dict}put}ifelse
/pdfmark where
{pop}
{userdict/pdfmark{cleartomark}put}ifelse

or the like (see the recommendations in Adobe's Pdfmark Reference
Manual).
Helge Blischke (H.Blischke@acm.org)

沒有留言:

張貼留言

Racknerd可不可以升級?搬VPS?搬遷的Step by Step (Racknerd 2024 Black Friday 新方案)

 先附上Racknerd 2024 Black Friday 新方案 RAM CPU core 空間 流量 頻寬 價格 1   G 1核 20G 1.5T/月 1Gbps $10.99/年 2.5G 2核 40G 3.0T/月 1Gbps $18.93/年 3   G 2核 60...