Linux Ghostscript:拆分大PDF会导致;pdfmark目的地页面“;错误

Linux Ghostscript:拆分大PDF会导致;pdfmark目的地页面“;错误,linux,pdf,debian,ghostscript,Linux,Pdf,Debian,Ghostscript,我正在尝试使用gs(Ghostscript版本8.62)将一个PDF拆分为两个较小的PDF 关于Debian Lenny)。我手头只有Debian Linux,所以请不要提供Windows或Mac解决方案 指定-dLastPage=740时,我收到错误: GPL Ghostscript 8.62: ERROR: A pdfmark destination page 1203 points beyond the last page 740. 我已经浏览了Ghostscript文档,了解如何禁用

我正在尝试使用gs(Ghostscript版本8.62)将一个PDF拆分为两个较小的PDF 关于Debian Lenny)。我手头只有Debian Linux,所以请不要提供Windows或Mac解决方案

指定
-dLastPage=740
时,我收到错误:

GPL Ghostscript 8.62: ERROR: A pdfmark destination page 1203 points
beyond the last page 740.
我已经浏览了Ghostscript文档,了解如何禁用 pdfmark完全(我不需要链接或书签来直接访问- 打印pdf)<代码>-dDOPDFMARKS=false不起作用

我在互联网上搜寻过任何报告类似错误的人。我 还没有找到解决办法

请帮忙

作为参考,我使用的命令是:

gs -dSAFER -dBATCH -sDEVICE=pdfwrite -DNOPAUSE -sPAPERSIZE=halfletter -
dFIXEDMEDIA -dEmbedAllFonts=true -sOutputFile=library.1of2.pdf -
dLastPage=740 -dPDFFitPage library.pdf
试试看(注:我是作者)。语法是:

deletepdfpage.pl library.pdf 741- library.1of2.pdf
deletepdfpage.pl library.pdf -740 library.2of2.pdf
或者以编程方式,大致如下所示:

use CAM::PDF;
my $pdf = CAM::PDF->new('library.pdf') || die;
$pdf->deletePages('741-');
$pdf->cleanoutput('library.1of2.pdf');

它是开源的,而且速度非常快。

事实证明,这个错误不是致命的。pdf是无论如何生成的,因为我不关心pdf链接或书签的功能,这个问题为我解决了


不过,一般来说,最好知道pdfmark或ghostscript失败的原因,以及如何生成具有功能链接的有效pdf。如果有人有答案,我还是很想听听。

你应该问一个新问题,详细说明你想如何以及在哪里生成什么样的“带功能链接的PDF”。

这是Ghostscript中的一个已知错误。看看这里:@drfloob当有人在你耳边小声说你是自己开始的谣言时,你会有什么感觉?:)