Printing to EMF/Creating EMF

  • Thread starter Thread starter hershi
  • Start date Start date
H

hershi

Hi all,
I have a scenario where I want to cause printing jobs on one computer
(running XP) to be rendered to EMF files, so that I can take these EMF
files and print them on another computer.
It seems this should have been an easy task, since according to the
documentation, windows uses EMF as the format of the print job files.
Alas, after spending some time playing around with all sorts of
printers and printer drivers, print processor settings and suchlike, I
still didn't succeed in creating a proper EMF representation of the
print job. I even tried to change the 'lpszDatatype' field of the
DOCINFO struct passed to StartDoc to "emf" to no avail. All I seem to
get is a file in "raw" format.

I did find some virtual printer drivers that gave this functionality,
like the open-source one from mabuse.de
(http://www.mabuse.de/vprinter.mhtml), which didn't perform very well,
and the one from two-pilots
(http://www.colorpilot.com/emfprinterpilot.html). This is a possible
solution, but it seems too complex considering that creating an EMF
should be part of the standard printing process in windows.

As a side note, one of the posts on google groups claimed that the EMF
files created by the spooler are not "true EMF", which made me wonder
what would be the difference between the two.

So my question is this: Does anyone know of a simple way to make
windows generate an EMF file of the print job?

Cheers
 
Hi,
look at http://undocprint.printassociates.com/formats/winspool/spl to
learn about the spool-file format. A spool file normally contains
multiple emf-pages and sometimes other information like fontdata.
At the bottom of the web page you find a list of spool-file-viewers
(I would recommend my own at www.lvbprint.de, but it is in german language).
You have to consider, that the spool-file does not contain the fonts
itself (only when printing to network printers, when the server does
not have the fonts installed). So you have to copy the used truetype fonts
to the other computer before printing the spool-file, if they are not
avaible there.

Dieter
 
If you are interested, you can write to me. I have written emf drivers for
several times. Also there is an opensource driver which I wrote couple of
years ago. search for printmirror in sourceforge.
 
Back
Top