在Windows中使用Ghostscript解锁pdf文件

时间:2014-07-31 10:10:32

标签: windows pdf ghostscript

我需要从pdf文件中解锁复制内容限制(复制和粘贴)。

在linux中我使用了ghostscript并且工作正常。但是在工作中我们获胜7。

我已经尝试使用ghostscript for win,gswin32c.exe:

gswin32c -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sFONTPATH=%windir%/fonts;xfonts;. -sPDFPassword= -dPDFSETTINGS=/prepress -dPassThroughJPEGImages=true -sOutputFile=OUTPUT.pdf INPUT.pdf

控制台输出是:

    **** Warning: File has a corrupted %%EOF marker, or garbage after %%EOF.
WARNING: /Unicode /Decoding is not accesible but it is useful for generating ToUnicode CMap.
Procesing pages 1 throught 1.
Page 1

pdf输入文件有4页,它不会生成output.pdf文件。

然后我将de输入文件从INPUT.pdf重命名为INPUT.ps并以相同的方式进行处理,但它也不会生成任何输出文件。输出控制台是:

   **** Warning: File has a corrupted %%EOF marker, or garbage after %%EOF.
WARNING: /Unicode /Decoding resource is not accessible but it is useful for gene
rating ToUnicode CMap.
Processing pages 1 through 4.
Page 1
Loading NimbusSanL-Regu font from n019003l.pfb... 2347400 998541 2841520 1526888
 3 done.
Loading NimbusSanL-Bold font from n019004l.pfb... 2404280 1086944 2841520 153288
3 3 done.
Page 2
Page 3
Page 4

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> null <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

我的Ghostscript版本是8.56。

使用Ghostscript的目的是我需要使用PDFminer Python库从pdf中提取内容文本。

0 个答案:

没有答案