WhenI try to print via cups-pdf any document that uses font AvantGarde-BookI get an empty pdf. When I tried yo investigate the problem by choosing "Print to file" in printing dialog I got a perfectly valid postcript document that was correctly rendered by ghostscript. When I tried to convert that very ps file with ps2pdf I got the following error: gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dSAFER '-sstdout=%stderr' -sOutputFile=pf.pdf -c .setpdfwrite -f pf.ps GPL Ghostscript 8.71 (2010-02-10) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Can't find (or can't open) font file /usr/share/ghostscript/8.71/Resource/Font/URWGothicL-Book. Can't find (or can't open) font file URWGothicL-Book. Can't find (or can't open) font file /usr/share/ghostscript/8.71/Resource/Font/URWGothicL-Book. Can't find (or can't open) font file URWGothicL-Book. Querying operating system for font files... Can't find (or can't open) font file /usr/share/ghostscript/8.71/Resource/Font/URWGothicL-Book. Can't find (or can't open) font file URWGothicL-Book. Didn't find this font on the system! Substituting font NewCenturySchlbk-Roman for URWGothicL-Book. Can't find (or can't open) font file /usr/share/ghostscript/8.71/Resource/Font/CenturySchL-Roma. Can't find (or can't open) font file CenturySchL-Roma. Can't find (or can't open) font file /usr/share/ghostscript/8.71/Resource/Font/CenturySchL-Roma. Can't find (or can't open) font file CenturySchL-Roma. Didn't find this font on the system! Unable to substitute for font. Error: /invalidfont in /findfont Operand stack: FL --nostringval-- AvantGarde-Book AvantGarde-Book Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_pop 1861 1 3 %oparray_pop 1755 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 1836 4 3 %oparray_pop Dictionary stack: --dict:1158/1684(ro)(G)-- --dict:0/20(G)-- --dict:90/200(L)-- Current allocation mode is local Last OS error: 2 Current file position is 747 GPL Ghostscript 8.71: Unrecoverable error, exit code 1 However, ps2pdf and scripts it calls being shell scripts, I was able to reconstruct the command actually passed to ghostscript, namely: gs -dNOPAUSE -dSAFER -dBATCH -sDEVICE=pdfwrite '-sstdout=%stderr' -sOutputFile=pf.pdf -c .setpdfwrite -f pf.ps I tried to remove the option -dSAFER leaving the rest options intact and I got my pdf rendered. So, IMHO either ghostscript should be instructed to trust the standard font path out of the box or the option -dSAFER should be removed from ps2pdf and friends, especially if you would like to get rid of users with mysterious cups-pdf problems ;-). Reproducible: Always
Setting /etc/env.d/99ghostscript: GS_LIB=/usr/share/fonts/urw-fonts has solved the issue for me. Can you please add setting this variable to the ebuild?
The standard font path is /usr/share/fonts/default/ghostscript which should be a symlink to /usr/share/fonts/urw-fonts in all recent ghostscript-gpl versions depending on urw-fonts. Please verify that the symlink exists on your system, attach an example ps, emerge --info output, which cups & cups-pdf versions you're using, out of which programm you're trying to print and anything else which helps reproducing your issue.