comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Importing IDL Postscript output into Windows apps
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Importing IDL Postscript output into Windows apps [message #5368] Fri, 01 December 1995 00:00
Richard Simpson is currently offline  Richard Simpson
Messages: 1
Registered: December 1995
Junior Member
I too have been spending a lot of time trying to get Wave output into MS Word.
The quite remarkable difficulty of this activity constantly frustrates the
work of my section. I have found a much simpler way on another computer which
I have at home and wonder if anyone knows if it would be possible to adopt
a similar approach on the PC.

At home I have an Acorn Risc PC (a computer made by Acorn Computers of
Cambridge England which runs a propriatory operating system on an ARM610 RISC
processor). I appreciate that Americans will never have heard of this machine,
but that doesn't matter. Acorns have an equivalent of Windows Meta File
format called "Draw files". This is vector file format which has essentially
the same functionality as WMF and can be VERY easily viewed rotated and
scaled in the word processing and DTP packages which run on the machine. Now,
I have obtained from an Internet server a PD package which takes Postscript
and converts it into a Draw file. It is fast and almost never fails and makes
using Wave output in documents generated on the Acorn completely trivial.

Since the user base for Acorn computers is less than 1% of the base for
Windows, surely somebody must have written a PD program which converts
Postscript to WMF? I have looked hard, but have been unable to locate such
a package. If anybody knows of one then I would be keen to obtain a copy.

Points to note:
1) Yes, I have got Ghostscript, but if you convert a Postscript file to a TIFF
with sufficient resolution for publication, then you end up with an
ENORMOUSE file.
2) Yes, I do have a program to convert from Draw to WMF, but it is of very
poor quality and only rarely generates a usefull output.

Clearly, the best solution would be a 'set_plot 'wmf'' command for Wave. But
I wouldn't expect such a thing to appear in the forseable future.

Richard Simpson
Farnborough, Hants, Uk Fax: 01252 392118
rsimpson@ewrcsdra.demon.co.uk
Re: Importing IDL Postscript output into Windows apps [message #5372 is a reply to message #5368] Fri, 01 December 1995 00:00 Go to previous message
hrebhan is currently offline  hrebhan
Messages: 10
Registered: January 1995
Junior Member
>
> Does Word support importing of vector graphics? I know that certain
> programs, like WordPerfect, claims to be able to import encapsulated
> PostScript files, but can only import the bitmap portion of it.A
>

This is not true if you have a PS-printer for your Word or Word Perfect
documents. In this case the word processor is just a kind of pipe for the
PS graphics. A bitmap portion, if present is only used for preview and
non PS printers.
Some problems may arise from different PS 'dialects' produced by different
graphic programms. For IDL 3.6 and Word 4.0 (MAC) everything works fine.

Servus Helge

--
------------------------------------------------------------ ----
| Helge Rebhan |
| Alfred-Wegener-Institut fuer Polar- @@@@ |
| und Meeresforschung ___||_ |
| \--/ oooo |--/ |
| Sektion Physik I ~~~\__________/~~~ |
| Am Handelshafen 12 |
| 27570 Bremerhaven |
| Tel. 0471-4831-287 |
| Fax. 0471-4831-425 e-mail : hrebhan@awi-bremerhaven.de |
------------------------------------------------------------ ----
Re: Importing IDL Postscript output into Windows apps [message #5374 is a reply to message #5368] Thu, 30 November 1995 00:00 Go to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Well it appears that I was a bit hasty in claiming that IDL postscript
output could not be imported successfully into Word for Windows 6.0.

In fact, single page IDL postscript files (created with or without the
/encapsulated keyword) can be imported into Word for Windows 6.0 just fine,
using "Insert, Picture". However it should be noted that a preview image is
*not* displayed in Word. Further, Word does not recognize the preview image
generated when you use the /preview keyword in IDL. More on preview images
later.....

Anyway, my problem was that I was not using the "Postscript Printer" driver
in Word for Windows, as was pointed out to me by Jun Tan (j.tan@rl.ac.uk).
The correct driver file name is PSCRPT.DRV, and it can be installed under
the Windows Control Panel Printers option.

So in short, to import IDL postscript into Word for Windows 6.0:
(1) Create the postscript file in IDL. Use of the /encapsulated keyword is
optional. Do not use the /preview keyword.
(2) Import the picture into Word using "Insert, Picture".
(3) Ensure that you are using the "Postscript Printer" driver in Word.
You can check this by looking at the "Printer: " identifier shown at
the top of the dialog box opened when you select "File, Print".

As long as you have a generic postscript printer, this procedure should
work just fine. We still have some unresolved problems with our HP Laserjet 4
printer when trying to print postscript images created using the /color keyword
in IDL that are imported into Word 6.0 documents. However I think this is
purely a printer problem.

Now to the subject of preview images. According to Mark Hadfield
(hadfield@storm.greta.cri.nz):
(start of quoted text)
MS Word will recognise preview bitmaps in TIFF and WMF forms, but not the
"device-independent" form that's added by the IDL /PREVIEW switch.

I know of two command-line tools that are supposed to add TIFF previews. These are
ps2epsf (available for Unix machines) and epstool (available for Unix, OS/2 &
Windows). I haven't managed to get either to work.

I add bitmap previews to all my EPS files using GSview, a Windows front-end to
Ghostscript. The procedure is a little tedious (you to make 3-4 menu selections &
enter a file name, also ensure you have selected several options appropriately) so I
wrote a Visual Basic front-end program that drives it. Like I said, not simple, but
it works. It works sufficiently well that I make all my graphs in EPS + preview form
and collect them inside Word documents.
(end of quoted text)

Like Mark, I spent some time trying to get ps2epsf and epstool to work. Due to
some version problems with ghostscript, I was unable to get them to work.
However, I did come up with a procedure that uses ghostscript, ImageMagick, and
NetPBM tools to add TIFF preview images to IDL postscript files, which can
then be imported into Word for Windows 6.0. As soon as I have fully tested and
debugged this approach, I'll post instructions.

Finally, I'm sorry if all this appears quite obvious. Our little IDL users group
here at UW has been trying to figure this out for some time.

Cheers,
Liam.
Re: Importing IDL Postscript output into Windows apps [message #5382 is a reply to message #5374] Wed, 29 November 1995 00:00 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Liam Gumley <liamg@ssec.wisc.edu> wrote:
>
> So if anyone has a *simple* procedure for importing IDL postscript
> graphics into Word for Windows 6.0, I would very much like to hear from
> you. By the way, I know there are several ways to do this on the Macintosh,
> but alas I do not have a Mac - just a Unix box (where I run IDL), and a PC
> (where I do word processing).
>
Sorry, I can't offer "simple". How about "fairly complicated".

MS Word will recognise preview bitmaps in TIFF and WMF forms, but not the
"device-independent" form that's added by the IDL /PREVIEW switch.

I know of two command-line tools that are supposed to add TIFF previews. These are
ps2epsf (available for Unix machines) and epstool (available for Unix, OS/2 &
Windows). I haven't managed to get either to work.

I add bitmap previews to all my EPS files using GSview, a Windows front-end to
Ghostscript. The procedure is a little tedious (you to make 3-4 menu selections &
enter a file name, also ensure you have selected several options appropriately) so I
wrote a Visual Basic front-end program that drives it. Like I said, not simple, but
it works. It works sufficiently well that I make all my graphs in EPS + preview form
and collect them inside Word documents.

At different times I have used either TIFF or WMF preview formats. The choice has
been driven by a number of factors. There have been several bugs in different
versions of the Word import filters, eg Word 2 (and maybe Word 6), would crash if
you imported an EPS file with a WMF preview exceeding 64 KB in size. Now, with Word
7/Windows NT I find the WMF previews to be the most satisfactory.

Feel free to contact me for further info.
Re: Importing IDL Postscript output into Windows apps [message #5386 is a reply to message #5382] Wed, 29 November 1995 00:00 Go to previous message
kkobayas is currently offline  kkobayas
Messages: 7
Registered: June 1994
Junior Member
"Ian E. Sprod" <Ian.Sprod@gsfc.nasa.gov> writes:

> Maybe I missed something, but isn't there a /encapsulated key word for
> the PostScript device driver in IDL? Does this still not help with
> WfW6.0??

Does Word support importing of vector graphics? I know that certain
programs, like WordPerfect, claims to be able to import encapsulated
PostScript files, but can only import the bitmap portion of it.A

- Ken


--
------------------------------------------------------------ -----------------
Ken Kobayashi . "Too low they build, who build
kkobayashi@cfa.harvard.edu . beneath the stars." - Edward Young
Re: Importing IDL Postscript output into Windows apps [message #5387 is a reply to message #5382] Wed, 29 November 1995 00:00 Go to previous message
Ian E. Sprod is currently offline  Ian E. Sprod
Messages: 12
Registered: February 1995
Junior Member
Liam Gumley <liamg@ssec.wisc.edu> wrote:
> Recent postings mentioned ps2epsf, a ghostscript/netpbm front-end
> Unix script for converting IDL postscript output into an encapsulated
> form that could be read by Windows applications (e.g. Word for Windows).
>
> After finding ps2epsf (it's not easy!), I went through the process
> of installing ghostscript and netpbm, and then testing ps2epsf.
> I can report that after 2 frustrating days I still cannot produce
> an encapsulated postscript file that Word for Windows 6.0 will
> import and print correctly (I know the WfW6.0 import filter is not the
> greatest, but we contacted MS, and got a "Sorry, you're outta luck" response).
>
> So if anyone has a *simple* procedure for importing IDL postscript
> graphics into Word for Windows 6.0, I would very much like to hear from
> you. By the way, I know there are several ways to do this on the Macintosh,
> but alas I do not have a Mac - just a Unix box (where I run IDL), and a PC
> (where I do word processing).
>
> Also, if you are listening RSI, *please* add this functionality to the next
> release of IDL. It is a major barrier which stops people adopting IDL as
> their sole visualization package (that's the case here anyway).
>
> Cheers,
> Liam.
>

Maybe I missed something, but isn't there a /encapsulated key word for
the PostScript device driver in IDL? Does this still not help with
WfW6.0??

--

Ian E. Sprod | 301-286-8036 | FAX 301-286-1616 | ian@skye.gsfc.nasa.gov
Re: Importing IDL Postscript output into Windows apps [message #5388 is a reply to message #5382] Tue, 28 November 1995 00:00 Go to previous message
hrebhan is currently offline  hrebhan
Messages: 10
Registered: January 1995
Junior Member
In article <49ddlu$fpt@spool.cs.wisc.edu> Liam Gumley <liamg@ssec.wisc.edu> writes:

>
> Recent postings mentioned ps2epsf, a ghostscript/netpbm front-end
> Unix script for converting IDL postscript output into an encapsulated
> form that could be read by Windows applications (e.g. Word for Windows).
>

Hello,

Normaly to convert from PS to EPS you just need to add the %%boundingbox
parameter line at the top and remove the 'showpage' command at the end
of the PS-file. This can be done by a simple Text-Editor !

BTW: Have you tried set plot, 'ps'
device, /encapsulated
...
which should do the job for most(?) export problems.

Another way might be to convert your output to tiff-format, which
is readable by Word (for MAC)

Servus, Helge

--
------------------------------------------------------------ ----
| Helge Rebhan |
| Alfred-Wegener-Institut fuer Polar- @@@@ |
| und Meeresforschung ___||_ |
| \--/ oooo |--/ |
| Sektion Physik I ~~~\__________/~~~ |
| Am Handelshafen 12 |
| 27570 Bremerhaven |
| Tel. 0471-4831-287 |
| Fax. 0471-4831-425 e-mail : hrebhan@awi-bremerhaven.de |
------------------------------------------------------------ ----
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL 4.0.1 reading problem?
Next Topic: Re: IDL Survey Comments

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:43:25 PDT 2025

Total time taken to generate the page: 0.00712 seconds