Looking for developers: processing of Windows EMF files for CUPS, NX, Samba and Freedesktop.org printing

Fabian Franz FabianFranz at gmx.de
Sat Jun 12 07:35:10 GMT 2004


Am Samstag, 12. Juni 2004 05:41 schrieb Michael B Allen:
> On Fri, 11 Jun 2004 01:29:06 +0200
>
> Fabian Franz <FabianFranz at gmx.de> wrote:
> > Spooling EMF to Windows ()instead of raw) to allow usage of the native
> > printer driver ...
>
> <snip>
>
> > Either implement OpenOffice PS-import (We'll need it anyway sooner or
> > later)
>
> I don't think that's possible. PostScript has no logical structure
> (e.g. you could have footnotes that are encoded at the beginning of the
> file stream). Thus there would be no way to reconstitute the logical
> structure of the document. If there are no implementations of something
> that would be obviously useful you should probably consider that there
> might be a technical limitation that makes the problem intractible.

You seem to have misunderstood me. I did not thought of PS-import as document 
format like Word or SXW, but as vector graphics. And imho it is kind of 
ironic, that OpenOffice.org can import and export EMF (which is kind of 
proprietary), but not import PS.

>
> If you are trying to convert PostScript to EMF there are two issues. The
> EMF format is trivial. It's just a recording of GDI commands in 4 byte
> aligned records. The problems are fonts and quality of implementation.

Yes, but for example OpenOffice.org has a near perfect implementation of the 
EMF-format.

>
> Fonts on the client may not be adequate on the host converting to
> PostScript. Unless you stick to the 12 base Latin1 and Symbols fonts
> you could get a big mess. You will not be able to print Marquee or
> Dingbats, etc.

As far as I could see from the Commens OpenOffice has already embededded some 
fonts, unless Bitstream Vera are now available on Windows by default ;-).

> The point is a *good* EMF to PostScript converter requires some serious
> forethought and a very good understanding of GDI and PostScript and
> where the drawing primatives intersect. It's a little like writing a
> compiler actually.

Well, EMF to PostScript is no issue I would say. OpenOffice.org (again) has 
rather good printing quality (I'm no expert there, you might know better). 

OpenOffice can import EMF without problems (as graphics of course) and it also 
can print to PS/PDF ...

> > One could also try to enhance libEMF to allow the whole EMF-"standard".
> > (Well, WINE GDI libs and OpenOffice.org source could help)
>
> Yes. WINE GDI code is highly informative for understanding EMF.

Yes, and there are also some good books about it.

My point was to create kind of an foomatic driver, that would export to EMF.

So vice versa:

PS -> EMF

While I understand that it is rather difficult to go from a "primitive" like 
EMF to PS, I believe it is not that difficult in the vice-versa way.

Thanks for answering.

cu

Fabian



More information about the samba-technical mailing list