[OS X Emacs] Aquamacs printing

David Reitter david.reitter at gmail.com
Tue Jan 22 12:46:47 EST 2008

On 22 Jan 2008, at 15:26, Jochen Küpper wrote:
> However, this is exactly the point. All other applications,  
> including Preview on a PDF, open the Print dialog with a default  
> papersize of A4. Only when I Preview and Print from Aquamacs does it  
> open in US Letter. It's annoying to change it by hand all the time,  
> and (at least) half the time I forget.
> For GNU Emacs, I set ps-paper-type to a4 and all is well. Aquamacs  
> does not honor this setting, so I am wondering what setting one has  
> to customize.

`ps-paper-type' applies primarily to PostScript printing, and Aquamacs  
doesn't print via PostScript.

Aquamacs prints to a PDF (OS X's internal format) and the printer  
driver always assumes Letter (independently of DefaultPaperID in  

This issue has bugged me for a long time. I've finally found a fix for  
this today. I suggest you try the patch below, which makes the  
printing system respect `ps-paper-type'. Works for me.

I'll try to work this out so that Aquamacs will always take  
DefaultPaperID as the default for ps-paper-type.

http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and  
support the Aquamacs Project!

*** src/site-lisp/macosx/mac-print.el	03 Apr 2007 17:18:27 +0100	1.11
--- src/site-lisp/macosx/mac-print.el	22 Jan 2008 17:38:47 +0000	
*** 127,132 ****
--- 127,134 ----
          (call-process html-to-pdf nil t nil
   		      "-f" html-file
   		      "-o" target-file
+ 		      "-a" (concat "media="
+ 				   (capitalize (symbol-name ps-paper-type)))
   		      "-j" "application/pdf"

More information about the MacOSX-Emacs mailing list