[graphics-dev] Re: Looking for developers: processing of Windows EMF files for CUPS, NX, Samba and Freedesktop.org printing

Sander Vesik Sander.Vesik at Sun.COM
Mon Jun 28 00:40:43 GMT 2004


Fabian Franz wrote:
> 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.
> 

But EMF is very probably not a turing complete programming language, 
while postscript MOST certainly is. The result is that importing PS 
really meansthat you need to interpret all of the instructions (as well 
as interpret the included fonts, if any), so you effectively need a 
foullblown postscript interpreter

> 
>>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 ;-).
> 

yes, but that doesn't come even close to covering the PS built-in fonts.


> 
>>>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.
> 

no. EMF (or for that matter WMF or some other simple vector format) to 
PS is always going to be infinitely easier compared to the opposite 
direction that basicly requires massive hacking on ghostscript or some 
other

> Thanks for answering.
> 
> cu
> 
> Fabian
> 

-- 

	Sander

Daniel Carrera: I think I'll stick to simple things like
the 5-dimensional gravity paper I'm reading.


More information about the samba-technical mailing list