On 2010-02-18, at 6:33 PM, t wrote: > On Thu, Feb 18, 2010 at 8:27 PM, Philippe Sismondi <[email protected]> > wrote: >> Greetings. >> >> I notice that neither skim nor Apple's preview app convert postscript >> generated by the emacs postscript print functions properly. Ghostscript >> handles postscript output by emacs/aquamacs just fine. >> >> Is there a known reason for this? >> > > Apple's Preview uses pstopdf to convert postscript, and there are > various reports of it having problems with certain postscript files > and fonts etc- it could be emacs that produces non-standard postscript > or maybe apple's pstopdf chokes on perfectly good postscript- who > knows. One way around it is to use enscript- you could make a little > emacs function to call enscript on the buffer and pass the output to > pstopdf. Another way is to use ghostscript (if you have macports then > install using 'port install ghostscript'), and then change your emacs > settings to use ps2pdf instead. > > Add these lines to your .emacs file and then call 'M-x print-to-pdf' > to get a pdf file in the same directory as your source. > > (defun print-to-pdf () > (interactive) > (ps-spool-buffer-with-faces) > (switch-to-buffer "*PostScript*") > (write-file "/tmp/tmp.ps") > (kill-buffer "tmp.ps") > (setq cmd (concat "ps2pdf /tmp/tmp.ps " (buffer-name) ".pdf")) > (shell-command cmd) > (shell-command "rm /tmp/tmp.ps") > (message (concat "Saved to: " (buffer-name) ".pdf")) > ) > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Skim-app-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/skim-app-users
Thanks. I am now happily using ghostscript as you suggested. I also filed a bug report with Apple and attached a sample ps file from aquamacs. Who knows whether this will do any good. I suspect not because the heavy use of pdf by Apple and the common usage of e.g. TeX on Macs makes me suspect that they will claim aquamacs/emacs creates "bad ps." Best, - Phil - ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Skim-app-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/skim-app-users
