PS/PDF output (was Re: Some advice please..)


Subject: PS/PDF output (was Re: Some advice please..)
From: Leonard Rosenthol (leonardr@lazerware.com)
Date: Tue Dec 21 1999 - 09:11:37 CST


At 8:44 PM -0600 12/20/99, sterwill@abisource.com wrote:
>Moving the PostScript capabilities to abi/src/af/gr/xp (where they should
>be) is easy, but making use of them in AbiWord for Win32 will require a bit
>more thought. There is this larger problem of fonts; AbiWord on Unix
>always has Type 1 fonts (and their metric files) available locally
>for PostScript printing. Windows makes no such checks, since it can
>draw and print (using the native Win32 printing DC) using Windows
>TrueType fonts.

        Understood. There are a number of good open source
implementations of reading the Type 1 metric files on other
platforms, so pulling that code over won't be a big deal. And the
metrics for the Base14 & Base41 are also available outside of the
actual files, so that supporting them w/o the actual metric files on
disk is no problem.

>Someone will need to restructure the font logic in the PostScript
>classes to optionally embed fonts, instead of always doing it (which
>is its default behavior).

        I would probably always do it, unless it's a Base14...

>Also, if your document has (for example) "Palladio" text in it ("Palladio"
>is a copy of the popular "Palatino" font) what resource do you name in your
>PostScript? One needs to know which fonts are in stanrdard PostScript
>printers. No one here has done the research to make some good mappings.

        My personal opinion would be to NOT try to do any mappings of
fonts, and simply do embedding for anything you don't know about.
Safer that way...

> > I ask because I'd like to add PDF exporting capabilities to
> > AbiWord at some point, and the easiest way to do that (since you've
> > already got PS generation) is to simply pipe the PS through
> > Distiller/Ghostscript/PStill/etc. But I'd want/need the PS generator
> > for the other platforms as well...How out of luck am I?
>
>I think the bulk of the work is already done. I'll be glad to help get
>the PostScript code over where it should belong (abi/src/af/gr/xp) if you'd
>like to use this on non-Unix platforms.

        I think so too, you've done the hard part of the PS generator
;). If you can move it into xp code, that would be a big help - but
I also understand that since it's not a high priority, it may wait
till post 1.0.

> Another thing that we'll have
>to work out is the Win32 interface for exporting PostScript. The Unix
>print dialog lets one pick a file and a type when printing to file (that's
>where the user can select PostScript 2.0). Windows handles its own
>printing throgh a common dialog. Can we easily merge this feature into
>this dialog?

        Since the end result is really PDF and not PS, I would simply
add another menu item to the File menu ("Export to PDF"?) and that
would being up a file dialog for naming/placing the file. I don't
know that we need to worry about options here as well in the first
release, but maybe something in the future based on user feedback.

        As Thomas points out, if the user simply wants PS on the
other platforms, they can use the Print command with a PS driver and
print to file. The reason for doing the direct piping to
Distiller/Ghostscript/PStill is not just for user convenience (which
is nice!) but also because it means we can add special "PDFMarks" to
the file to bring things like bookmarks, hyperlinks, etc. into the
PDF.

Leonard

----------------------------------------------------------------------------
                   You've got a SmartFriend in Pennsylvania
----------------------------------------------------------------------------
Leonard Rosenthol Internet: leonardr@lazerware.com
                                        America Online: MACgician
Web Site: <http://www.lazerware.com/>
FTP Site: <ftp://ftp.lazerware.com/>
PGP Fingerprint: C76E 0497 C459 182D 0C6B AB6B CA10 B4DF 8067 5E65



This archive was generated by hypermail 2b25 : Tue Dec 21 1999 - 09:07:38 CST