unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Peter Dyballa <Peter_Dyballa@Web.DE>
To: stromme@math.uib.no (Stein Arild Strømme)
Cc: help-gnu-emacs@gnu.org
Subject: Re: postscript printing from emacs
Date: Fri, 23 Mar 2007 18:04:42 +0100	[thread overview]
Message-ID: <8C4EA5A3-EA5C-46C2-8270-9E2A6AB4C24D@Web.DE> (raw)
In-Reply-To: <jxuwt18rmq8.fsf@mi061052.klientdrift.uib.no>


Am 23.03.2007 um 16:41 schrieb Stein Arild Strømme:

> I also find it suspicious that Preview.app in OS X cannot display  
> the file correctly (it does
> with other postscript files).

I reported this error before. Ps-print is pretty useless, in any case  
in Mac OS X. Besides this it only supports one or two encodings: US 7- 
bit ASCII and ISO 8859-1.

 From the failure with Preview you can deduce that the Mac OS X and  
CUPS related mechanisms to prepare the PS output for printing are the  
reason that your printer reports a failure. It's nothing but non- 
sense that gets into the printer queue. (You can halt the queue and  
inspect what's in it!)

>
> So what is it about the ps-print-generated postscript files fools the
> printer and Preview.app, that's the question.

I presume it's like MSIE "optimised" web sites: only Ghostscript can  
convert and only Ghostscript can display. So the function family  
should better, before release of GNU Emacs 22.1, be renamed gs-print.  
BTW, the PDF output gs 8.54 produces from ps-print output on my Mac  
(Mac OS X 10.4.9) cannot be displayed in Preview, either.

>
> | > As alternatives, I'm exploring ways to use a2ps or enscript  
> instead,
> | > but they don't seem to support utf-8.  Other ways?
> |
> | Use htmlize to convert the buffer or region content to UTF-8 encoded
> | HTML, view it in a capable browser, print from the browser.
>
> That is tongue-in-cheek, surely?

No. It's a proven way. And it's the only way a few members on this  
list could find. The (Japanese) Carbon Emacs (Package) uses such a  
conversion and then uses an adapted version of the Coral application  
to convert HTML to PDF. You can try to use Apple's /System/Library/ 
Printers/Libraries/convert – it is meant to prepare or produce  
printer queue material.

Lennart Borgman has written htmlize-view.el to ease the conversion of  
buffer or region contents to HTML, and view it in your default  
browser. Then press Print ...


The problem with PostScript is that it usually only supports 8 bit  
encodings. So you can't print Unicode. You can try to find a CID  
keyed PostScript font and with some effort you can print CJK. No such  
font is available for free or public domain. TrueType and OpenType  
fonts have better Unicode support. Modern PostScript can use such  
TrueType fonts, which are quite often free and acceptable quality.  
But I have no idea how to create a mapping from an UTF-8 encoded text  
to a Unicode encoded font in PostScript.

--
Greetings

   Pete

Mac OS X is like a wigwam: no fences, no gates, but an apache inside.

  reply	other threads:[~2007-03-23 17:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-23 14:03 postscript printing from emacs Stein Arild Strømme
2007-03-23 14:07 ` Stein Arild Strømme
2007-03-23 15:17 ` Peter Dyballa
2007-03-23 15:41   ` Stein Arild Strømme
2007-03-23 17:04     ` Peter Dyballa [this message]
     [not found]     ` <mailman.1318.1174669608.7795.help-gnu-emacs@gnu.org>
2007-03-23 21:17       ` Stein Arild Strømme
2007-03-23 21:58         ` Lennart Borgman (gmail)
     [not found]         ` <mailman.1344.1174687255.7795.help-gnu-emacs@gnu.org>
2007-03-23 23:12           ` Stein Arild Strømme
2007-03-24  9:38             ` Peter Dyballa
2007-03-24 12:13               ` Lennart Borgman (gmail)
     [not found]             ` <mailman.1355.1174729271.7795.help-gnu-emacs@gnu.org>
2007-04-09  8:49               ` David Combs
2007-04-09 23:14                 ` Peter Dyballa
2007-03-26  7:22           ` Stein Arild Strømme
2007-03-28 11:11             ` Stein Arild Strømme
2007-03-24  7:39       ` Charles philip Chan
2007-03-24  7:46       ` Charles philip Chan
2007-03-24  8:06 ` Charles philip Chan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8C4EA5A3-EA5C-46C2-8270-9E2A6AB4C24D@Web.DE \
    --to=peter_dyballa@web.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=stromme@math.uib.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).