Thread View: comp.lang.postscript
3 messages
3 total messages
Started by Richard Burgess
Fri, 28 Aug 1992 12:19
Raw MS-Windows GDI to Postscript Converter
Author: Richard Burgess
Date: Fri, 28 Aug 1992 12:19
Date: Fri, 28 Aug 1992 12:19
19 lines
1277 bytes
1277 bytes
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.
Richard Burgess
The Cleveland Clinic Foundation
email burgess@eniac.seas.upenn.edu
Re: Raw MS-Windows GDI to Postscript Converter
Author: 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.
Re: Raw MS-Windows GDI to Postscript Converter
Author: Ken Blackwell
Date: Tue, 01 Sep 1992 23:30
Date: Tue, 01 Sep 1992 23:30
30 lines
1885 bytes
1885 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. |> Richard Burgess |> The Cleveland Clinic Foundation |> email burgess@eniac.seas.upenn.edu If you are keeping everything local on the PC, why not write the data out to a Windows Metafile? Many packages (Word, Micrografx Designer, etc.) can read a Metafile and display/print it. It is also easy to write a program to play one in a window. (SDK contains a sample that is close to what you may want.) If you really need the file in PS format for viewing on UNIX/VMS/etc. systems under ghostscript, how about printing to a file on the PC in PS format and copying that file over to the target system? Either of these can be done in Windows without having to write code. ====================================================================== Ken Blackwell Bristol Technology Inc. Internet: ken@bristol.com 898 Ethan Allen Highway UUCP: uunet!bristol!ken Ridgefield, CT 06877 (203) 438-6969 Fax: (203) 438-5013 BTI Product Information: info@bristol.com ======================================================================
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads