Article View: comp.lang.postscript
Article #2015Re: Raw MS-Windows GDI to Postscript Converter
From: Jim Talley
Date: Fri, 28 Aug 1992 22:56
Date: Fri, 28 Aug 1992 22:56
51 lines
2955 bytes
2955 bytes
In article <87290@netnews.upenn.edu> burgess@eniac.seas.upenn.edu (Richard Burgess) writes:
> I have a need to convert GDI calls (text and graphics directed at
> the printer) to a saveable file format. While I did not previously
> need to store an electronic copy of this form, a need has arisen.
> If anyone knows of a converter that inputs standard windows
> calls and outputs any type of standard file that can be saved,
> displayed on a screen, etc - I would be totally psyched.
> As it is, I probably am going to have to write a GDI to
> postscript converter from scratch and use Ghostscript or some
> such to display the file on the screen(althought the main
> need is for archiving).
> Should I use some format other than postscript, does such
> a converter already exist, any ideas at all? - Inquiring minds
> want to know.
Yes, such a converter does exist... the Postscript printer driver.
What you describe is exactly what a driver does -- i.e., it converts
Windows meta-file data (a series of GDI commands) into the equivalent
commands for rendering on the target device, in your case Postcript.
Just direct the output to a file. You might also want to send it as
an EPS file by checking the box in the Postcript printer setup dialog.
An alternative format that is somewhat easier to get other programs to
digest (i.e., doesn't require that the consumer of your output contain
a full Postcript interpreter) would be as an HPGL (plotter) file.
This can be produced in the same way as with Postscript, except, of
course, using the HP Plotter driver. It has the advantage over some
other possibilities of keeping your graphics in vector rather than
bitmap format.
If you require some other format (e.g., TIFF), I don't believe the
printer driver route offers a solution, but there is no shortage of
graphics utilities which can import a .WMF (Windows Meta-File) and
save to a variety of formats -- many are freeware/shareware and
available on the net.
So, save your programming skills for something without a readily
available solution. Hell... take a vacation in lieu of spending the
1000 hours that you would have spent "quickly" hacking up that little
converter! :-)
-- Jim
talley@mcc.com
--
----------------------------------------------------------------------
Jim Talley
----------------------------------------------------------------------
MCC -- Carnot Proj. | Linguistics Dept.
Technical Details
Message-ID:
<1992Aug28.225637.25960@mcc.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!milano!talleyReferences:
<87290@netnews.upenn.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!milano!talley From: talley@mcc.com (Jim Talley) Subject: Re: Raw MS-Windows GDI to Postscript Converter In-Reply-To: burgess@eniac.seas.upenn.edu's message of 28 Aug 92 12:19:46 GMT Message-ID: <1992Aug28.225637.25960@mcc.com> Organization: MCC, Austin, TX References: <87290@netnews.upenn.edu> Date: Fri, 28 Aug 1992 22:56:37 GMT Lines: 51