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

Home » Public Forums » archive » Re: Printing iTools window to PS file
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: Printing iTools window to PS file [message #46801] Thu, 05 January 2006 02:52
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
Kenneth Bowman wrote:

> Neither file will open in any of the software tools I normally use with PS files
> (Illustrator, Distiller, pstopdf, Photoshop (reports a parser error),
> GraphicConverter, ...)

If the Adobe utilities cannot handle this file, I think you are on a
dead end. Unfortunately, postscript errors are really obnoxious, and
totally unintelligeble even to experts.

Have you tried ghostscript? Sometimes pstops will clean a file enought
to get the rest of ghostscript (or other utilities) to understand the
file. Another one is to try ps2epsi, as it may filter out some of the
offending commands.

Are you sure the file is ascii only? Some utilities save to a "binary"
form, that is perfectly fine with printers, but utterly useless with
other tools.

Maarten
Re: Printing iTools window to PS file [message #46808 is a reply to message #46801] Wed, 04 January 2006 13:37 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <%oTuf.26$oD4.5809@news.uswest.net>,
"R.G. Stockwell" <no@email.please> wrote:

> Ken, I doubt it matters, but did you remove the last line as well as the
> first 2 lines?
> (i.e. keep the eof line, but delete the last 2)
> (%%EOF
> %-12345X@PJL EOJ
> %-12345X)

Yup, did that. Didn't help.

I tried printing the file two different ways with the HP Color PS device:
direct to printer (I stopped the print queue and saved the file)
to a file (created xprinter.out)

The two files are both about 13 MB. They appear to have a sequence of
high-resolution bitmaps (tiled image, I suppose).

The files are also nearly identical. Except for the date stamp, they are the
same for the first 8.1 MB. (Don't ask me why they are different after that
point.)

Both files can be sent to an HP color printer without problems. To the eye they
are indistinguishable.

Neither file will open in any of the software tools I normally use with PS files
(Illustrator, Distiller, pstopdf, Photoshop (reports a parser error),
GraphicConverter, ...)

So, to send graphics to a colleague, I can send them the ps file, which they can
print, but not view on their screens; or I can make low-res bitmaps.

Do users of Windows or other versions of Unix have this problem, or is it just
MacOS? That is, can you convert an xprinter.out file to PDF, for example?

Ken
Re: Printing iTools window to PS file [message #46811 is a reply to message #46808] Wed, 04 January 2006 09:15 Go to previous message
news.qwest.net is currently offline  news.qwest.net
Messages: 137
Registered: September 2005
Senior Member
"Kenneth Bowman" <k-bowman@null.tamu.edu> wrote in message
news:k-bowman-806969.10541104012006@news.tamu.edu...
> In article <1136384657.557317.34320@g44g2000cwa.googlegroups.com>,
> "Maarten" <maarten.sneep@knmi.nl> wrote:
....
>> The PS header you showed suggests that the HP driver is acting up: the
>> first two lines indicate a PCL wrapper around the postscript. You may
>> want to remove those first two lines and try to convert again. Can you
>> try to print to some "generic" postscript printer?
>
> I tried that simple expedient to no avail.
>
> Thanks for the suggestions, Ken

I also had the PCL wrapper around my postscript file, and it didn't
cause any trouble. (I could ghostview it, distill to pdf etc.) I don't
think
that is the cause of the problem.

Ken, I doubt it matters, but did you remove the last line as well as the
first 2 lines?
(i.e. keep the eof line, but delete the last 2)
(%%EOF
%-12345X@PJL EOJ
%-12345X)


Cheers,
bob
Re: Printing iTools window to PS file [message #46812 is a reply to message #46811] Wed, 04 January 2006 08:54 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <1136384657.557317.34320@g44g2000cwa.googlegroups.com>,
"Maarten" <maarten.sneep@knmi.nl> wrote:

> If you can reach the print dialog, you can print to pdf or ps file from
> _any_ application on Mac OS X (the left-most button is actually a popup
> menu that allows you to select one of the various output options).
> However, since IDL allegedly uses the X-Window system, rather than the
> native system, I think you will not reach the standard print dialog. (I
> prefer to use a Mac, but I'm stuck with Linux at work, so I've never
> seen IDL under Mac OS X).

Since IDL runs in the X-Windows environment, it does not use the standard MacOS
print facilities. Instead it uses the Xprinter software that RSI bought from
Bristol a long time back. One of the annoying things about Xprinter is that it
spits out error message when you do simple things like click on a menu

Warning:
Name: printerCombo_listSW
Class: XmScrolledWindow
Illegal value (255) for rep type XmRDirection

That does not inspire confidence that it works well.

> The PS header you showed suggests that the HP driver is acting up: the
> first two lines indicate a PCL wrapper around the postscript. You may
> want to remove those first two lines and try to convert again. Can you
> try to print to some "generic" postscript printer?

I tried that simple expedient to no avail.

Thanks for the suggestions, Ken
Re: Printing iTools window to PS file [message #46813 is a reply to message #46812] Wed, 04 January 2006 09:01 Go to previous message
David Alexander is currently offline  David Alexander
Messages: 26
Registered: August 2005
Junior Member
You can actually use the Export feature to export data (by selecting
"To an IDL variable" on the first Export Wizard screen) . It's a sort
of all-purpose export command, I guess.

As for the bitmap vs. vector output issues: those are limitations of
bitmap and vector output. There's a pretty good discussion of this in
the IDL docs in:

Object Programming
--Display, Copying, and Printing Objects
----Bitmap and Vector Grahpics Output

In particular, see the section titled "Guidelines for Choosing Bitmap
or Vector Graphics".

But fonts could still use improvement in IDL. We need vector quality
fonts in bitmap mode.
Re: Printing iTools window to PS file [message #46814 is a reply to message #46812] Wed, 04 January 2006 06:24 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
R.G. Stockwell wrote:
> I've got about 5 actual printers there, and 2 "virtual" printers which are just postscript
> drivers that will print to file. It is a handy way of creating postscript files even if your
> application does not allow it. I don't think I can help you with MacOS though.

If you can reach the print dialog, you can print to pdf or ps file from
_any_ application on Mac OS X (the left-most button is actually a popup
menu that allows you to select one of the various output options).
However, since IDL allegedly uses the X-Window system, rather than the
native system, I think you will not reach the standard print dialog. (I
prefer to use a Mac, but I'm stuck with Linux at work, so I've never
seen IDL under Mac OS X).

The PS header you showed suggests that the HP driver is acting up: the
first two lines indicate a PCL wrapper around the postscript. You may
want to remove those first two lines and try to convert again. Can you
try to print to some "generic" postscript printer?

Maarten
Re: Printing iTools window to PS file [message #46816 is a reply to message #46814] Tue, 03 January 2006 15:58 Go to previous message
news.qwest.net is currently offline  news.qwest.net
Messages: 137
Registered: September 2005
Senior Member
"Kenneth Bowman" <k-bowman@null.tamu.edu> wrote in message
news:k-bowman-5FC461.16421603012006@news.tamu.edu...
> Hi Bob,
>
> I don't have any problems when I use the PS driver for direct graphics,
> but with
> iTools I think the Printer device is the only option. Is that what you
> meant?

Yeah, i guess. When you print from itools under windows, it pops up the
printer dialog, and gives you access to all the printers. I've got about 5
actual printers there, and 2 "virtual" printers which are just postscript
drivers
that will print to file. It is a handy way of creating postscript files
even if your
application does not allow it. I don't think I can help you with MacOS
though.

Cheers,
bob
Re: Printing iTools window to PS file [message #46818 is a reply to message #46816] Tue, 03 January 2006 14:42 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <uXBuf.32$xX3.10047@news.uswest.net>,
"R.G. Stockwell" <no@email.please> wrote:

> Hi Ken,
> offhand I would suggest that it is a problem with the
> printer driver. Can you install a pure postscript driver
> instead of going through xprinter (I know nothing about macos)
>
> It works fine for me under windows, idl 6.1. I can ghostview,
> distill it to pdf etc.
>
> Details:
>
> { x86 Win32 Windows Microsoft Windows 6.1.1 Oct 11 2004 32 64}
> and
>
> %-12345X@PJL JOB
> @PJL SET RESOLUTION = 600
> @PJL ENTER LANGUAGE = POSTSCRIPT
> %!PS-Adobe-3.0
> %%Title: IDLGr2Document
> %%Creator: PScript5.dll Version 5.2.2
> %%CreationDate: 1/3/2006 14:18:23
> %%For: stockwell
> %%BoundingBox: (atend)
> %%Pages: (atend)
> %%Orientation: Portrait
> %%PageOrder: Special
> %%DocumentNeededResources: (atend)
> %%DocumentSuppliedResources: (atend)
> %%DocumentData: Clean7Bit
> %%TargetDevice: (HP LaserJet 5) (2014.103) 1
> %%LanguageLevel: 2
> %%EndComments
>
> %%BeginDefaults
> %%PageBoundingBox: 13 13 599 780
> %%ViewingOrientation: 1 0 0 1
> %%EndDefaults

Hi Bob,

I don't have any problems when I use the PS driver for direct graphics, but with
iTools I think the Printer device is the only option. Is that what you meant?

MacOS should work just like any of the other Unix flavors. (That is, with the
awful Xprinter interface. The copyright notice on the Xprinter interface is
dated 1998, which may indicate something.)

Ken
Re: Printing iTools window to PS file [message #46819 is a reply to message #46818] Tue, 03 January 2006 14:42 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <1136324163.321719.67800@g44g2000cwa.googlegroups.com>,
"David Alexander" <davidessandro@yahoo.com> wrote:

> Ken,
>
> To save an image of what's in your iTool window, use the File->Export
> option in any iTool, then select "To a file" on the first screen. You
> can save to any of the IDL-supported file formats (including eps, if
> you want postscript).
>
> Dave

Ah, that shows how much I understand iTools. I thought Export was to export the
*data*, not the *graphics*. (I can't say that I care much for the Microsoft
step-through-these-dialog-boxes "Wizard" approach, though.)

When I print to hardcopy (HP color printer), the text looks like vectors (i.e.,
crisp), not bitmaps. The text in the EPS file created by Export has that
quaint, fuzzy, bitmap look.

Exporting in bitmap mode apparently just puts a bitmap into an EPS file.
Exporting in vector mode loses the texture-mapped colors on the iSurface. Oh
well, I guess I'll get by with large bitmapped files.

Thanks for the help, Ken
Re: Printing iTools window to PS file [message #46820 is a reply to message #46818] Tue, 03 January 2006 13:36 Go to previous message
David Alexander is currently offline  David Alexander
Messages: 26
Registered: August 2005
Junior Member
Ken,

To save an image of what's in your iTool window, use the File->Export
option in any iTool, then select "To a file" on the first screen. You
can save to any of the IDL-supported file formats (including eps, if
you want postscript).

Dave
Re: Printing iTools window to PS file [message #46821 is a reply to message #46820] Tue, 03 January 2006 13:23 Go to previous message
news.qwest.net is currently offline  news.qwest.net
Messages: 137
Registered: September 2005
Senior Member
"Kenneth Bowman" <k-bowman@null.tamu.edu> wrote in message
news:k-bowman-A56A92.13435703012006@news.tamu.edu...
> I am trying to print an iTools window to a Postscript file. Printing works
> fine
> if the output is sent directly to an HP Color Laserjet.
>
> If I print to a file (xprinter.out), however, the file is not usable in
> any of
> my usual Postscript tools (Illustrator, pstopdf, Preview, Distiller). The
> Distiller output log is:
...
>
> IDL Version 6.2, Mac OS X (darwin ppc m32). (c) 2005, Research Systems,
> Inc.
>
>
> P.S. The beginning of the PS file looks like this
>
> %-12345X@PJL JOB
> @PJL ENTER LANGUAGE=POSTSCRIPT<0A>
> %!PS-Adobe-3.0
> %XprinterPrinter-Model: HP Color LaserJet PS
> %%Creator: Wind/U Xprinter Version 3.3.1 (darwin) (Compile Date: Oct 22
> 2001
> 12:42:02) (bowman)
> %%Title:
> %%CreationDate:Tue Jan 3 12:48:02 2006
> %%DocumentSuppliedResources: (atend)
> %%Pages: (atend)
> %%LanguageLevel: 2
> %%EndComments
> %%BeginProlog


Hi Ken,
offhand I would suggest that it is a problem with the
printer driver. Can you install a pure postscript driver
instead of going through xprinter (I know nothing about macos)

It works fine for me under windows, idl 6.1. I can ghostview,
distill it to pdf etc.

Details:

{ x86 Win32 Windows Microsoft Windows 6.1.1 Oct 11 2004 32 64}
and

%-12345X@PJL JOB
@PJL SET RESOLUTION = 600
@PJL ENTER LANGUAGE = POSTSCRIPT
%!PS-Adobe-3.0
%%Title: IDLGr2Document
%%Creator: PScript5.dll Version 5.2.2
%%CreationDate: 1/3/2006 14:18:23
%%For: stockwell
%%BoundingBox: (atend)
%%Pages: (atend)
%%Orientation: Portrait
%%PageOrder: Special
%%DocumentNeededResources: (atend)
%%DocumentSuppliedResources: (atend)
%%DocumentData: Clean7Bit
%%TargetDevice: (HP LaserJet 5) (2014.103) 1
%%LanguageLevel: 2
%%EndComments

%%BeginDefaults
%%PageBoundingBox: 13 13 599 780
%%ViewingOrientation: 1 0 0 1
%%EndDefaults



Cheers,

bob
Re: Printing iTools window to PS file [message #46822 is a reply to message #46821] Tue, 03 January 2006 12:51 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kenneth Bowman writes:

> I am trying to print an iTools window to a Postscript file. Printing works fine
> if the output is sent directly to an HP Color Laserjet.
>
> If I print to a file (xprinter.out), however, the file is not usable in any of
> my usual Postscript tools (Illustrator, pstopdf, Preview, Distiller). The
> Distiller output log is:
>
> .
> .
> .
> %%[ Error: ioerror; OffendingCommand: imageDistiller ]%%
>
> Stack:
> 1.0
> -save-
>
> %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
> %%[ Warning: PostScript error. No PDF file produced. ] %%
>
>
> pstopdf chokes with a similar error.
>
> %%[ Error: ioerror; OffendingCommand: image ]%%

First of all, I think this is not an iTool problem. I've encountered
exactly the same problem trying to make PDF files of book chapters.
Unfortunately, I don't know exactly what the problem is now, because
it has gone away. I attributed this "lack of a problem" to upgrading
to version 7 of Acrobat Distiller, but I don't feel 100% comfortable
with this hypothesis.

I just tried creating PostScript files with iPlot and iImage, using
an Apple Color Laserwriter 12/600 PostScript driver on Windows. I
had no difficulty creating a PDF from these files with Acrobat
Distiller 7, but--oddly--the PDF file is not in grayscale for either
file. It seems to be in shades of a subdued red! Go figure!

I notice too that if I try to print directly to a PDF file by
selecting the Adobe PDF driver that IDL completely hangs and
I have to get out the ol' CNTL-ALT-DELETE. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Inverting large matrices using LA_LUDC and LA_LUSOL.
Next Topic: HDF attribute extract

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

Current Time: Wed Oct 08 09:15:00 PDT 2025

Total time taken to generate the page: 0.00457 seconds