Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Printing in OSX

20 views
Skip to first unread message

Neuwirth Erich

unread,
Oct 14, 2012, 3:23:54 AM10/14/12
to help-gn...@gnu.org
Emacs 24.2, OSX 10.8.2

My printer has A4 as the default paper format.
But whenever I print for poscript print,
it asks for letter paper and I have to manual override this.
Googling I founr I should do

(setq ps-paper-type 'a4)


but this does not help either.

Is there a way way to get rid of this annoyance?



Peter Dyballa

unread,
Oct 14, 2012, 4:49:53 AM10/14/12
to Neuwirth Erich, help-gn...@gnu.org

Am 14.10.2012 um 09:23 schrieb Neuwirth Erich:

> Is there a way way to get rid of this annoyance?

Did you restart GNU Emacs after that change in your init file?

You can also position the text cursor inside the symbol (or text) "ps-paper-type" and type C-h v. A *Help* buffer will open explaining that the symbol is a variable for a special purpose and has a value, nil or something else. This buffer will also offer to customise the variable's value. This customisation interface also offers to set the new value for the current session or to save it for the future, i.e., record it in your init file.

Having done the latter, you can erase your own Emacs Lisp statement… Using the "official" customisation interface is much more reliable – and you have your customisations put together in a single block (or two).

Did you set the paper size correctly in System Preferences? Have you tried to "read" the PS output from GNU Emacs? While the print command from the File menu is for example ps-print-buffer-faces, which produces in the background the PS file and forwards it to your OS's printing system, the command ps-spool-buffer-faces ("print" substituted with "spool") will insert the PS text into a buffer called *PostScript*. Here you can easily check whether the correct values are used. (You can also save this buffer to a file and view that PS file in some PS viewer.)

--
Mit friedvollen Grüßen

Pete

These are my principles and if you don't like them... well, I have others.
- Groucho Marx


Neuwirth Erich

unread,
Oct 15, 2012, 2:23:19 AM10/15/12
to Peter Dyballa, help-gn...@gnu.org
This is what I get in the postscript buffer.

-=-=-=
[/h1 (~/)]
]def
/HeaderLinesRight[
[/h0 /pagenumberstring load]
[/h1 (10/15/12)]
]def
2 SetHeaderLines
0 BeginPage
/f0 F
false BG
0.000 0.000 0.000 FG
0 EF
(\344\366\337) S
PHL
EndPage
EndDSCPage
EndSheet

%%Trailer
%%Pages: 1

EndDoc

%%EOF
-=-=-=


When I save it as xxx.ps and then double click this file, it will be converted to Postscript I an print it.
It will be printed immediately, the printer will not ask for letter paper.

Peter Dyballa

unread,
Oct 16, 2012, 5:06:27 AM10/16/12
to Neuwirth Erich, help-gn...@gnu.org

Am 15.10.2012 um 08:23 schrieb Neuwirth Erich:

> This is what I get in the postscript buffer.

This is not the complete PostScript code. It is just the end, with

> [/h1 (~/)]

making clear that you used your home directory for producing the PostScript output. In the beginning you should have something like this:

%!PS-Adobe-3.0
...
%%Orientation: Portrait
%%DocumentNeededResources: font Times-Roman Times-Italic
...
%%DocumentMedia: A4 595 842 0 () ()
%%PageOrder: Ascend
%%Pages: (atend)
%%Requirements:
%%EndComments
%%BeginDefaults
%%PageMedia: A4
%%EndDefaults


>
> When I save it as xxx.ps and then double click this file, it will be converted to Postscript I an print it.

Why do you convert PostScript to PostScript? Isn't it PDF that Mac OS X produces?

> It will be printed immediately, the printer will not ask for letter paper.

Which tools do you have to view PostScript or PDF files?

--
Mit friedvollen Grüßen

Pete
You can never know too little of what is not worth knowing at all.
– Anon.



0 new messages