View Full Version : Printing to EMF/Creating EMF


hershi@gmail.com
10-06-2006, 09:57 PM
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

Dieter
10-07-2006, 09:07 PM
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
> 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
>

Vipin
10-09-2006, 08:45 PM
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.

--
Vipin Aravind
http://blogs.explorewindows.com

<hershi@gmail.com> wrote in message
news:1160168232.721425.111140@h48g2000cwc.googlegroups.com...
> 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
>