persisting problems with pdf display in `gv': error /undefined in copy_trailer_attrs

joerg van den hoff j.van_den_hoff at fzd.de
Fri May 21 02:06:47 PDT 2010


On Thu, 20 May 2010 14:51:18 +0200, Ryan Schmidt <ryandesign at macports.org>  
wrote:

>
> On May 19, 2010, at 13:45, joerg van den hoff wrote:
>
>> I reported something similar a few weeks back (no response, though):  
>> after
>> a further `port selfupdate; port update outdated' the problem persists:
>>
>> gv any_pdf_file
>>
>> throws the ghostscript error:
>>
>> /undefined in copy_trailer_attrs
>>
>> and that's it. doing
>>
>> gs any_pdf_file
>>
>> works as does
>>
>> gv any_ps_file
>>
>> this is on 10.6 x86 powerbook with current macports and gv-3.6.9,  
>> gs-8.71
>>
>> any ideas?
>
> Sorry you didn't get a response before, but it's probably just because  
> nobody knew how to help you. You may need to ask the developers of gv  
> for assistance.

ryan,

I followed your advice, contacting the `gv' maintainer, who thankfully  
responded quickly and to the point:
this is not a `gv' bug but rather a bug in ghostscript 8.71. the affected  
file is at (for macports):

/opt/local/share/ghostscript/8.71/lib/pdf2dsc.ps

and here is the diff to patch it:

==========CUT=============
--- ghostscript-8.71/lib/pdf2dsc.ps.copy_trailer_attrs	2008-02-25  
05:48:45.000000000 +0000
+++ ghostscript-8.71/lib/pdf2dsc.ps.copy_trailer_attrs	2010-02-19  
21:35:15.000000000 +0000
@@ -116,7 +116,7 @@ systemdict /.setsafe known { .setsafe }
     DSCfile PDFname write==only
     ( \(r\) file { DELAYSAFER { .setsafe } if } stopped pop\n) puts
     ( pdfopen begin\n) puts
-   ( copy_trailer_attrs\n) puts
+   ( process_trailer_attrs\n) puts
     (%%EndSetup\n) puts

     /.hasPageLabels false def % see "Page Labels" in the PDF Reference
==========CUT=============

found here:  
https://bugzilla.redhat.com/attachment.cgi?id=395186&action=edit

after this patch `gv' displays pdf just fine as it used to do.

I think this should of course be patched upstream, but if this does not  
work right now, it should be done during the macports install process  
(sorry, I don't know
the internals of `ports', otherwise I would do it...)

thanks again and
best regards,

joerg


More information about the macports-users mailing list