Bug 691758 - GSPrint - using Wildcard
Summary: GSPrint - using Wildcard
Status: RESOLVED INVALID
Alias: None
Product: Artifex GSview
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P4 normal
Assignee: Russell Lang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-08 23:49 UTC by bryan.sellens
Modified: 2011-02-28 13:48 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
Screen print of error (256.12 KB, image/bmp)
2010-11-08 23:49 UTC, bryan.sellens
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bryan.sellens 2010-11-08 23:49:02 UTC
Created attachment 6877 [details]
Screen print of error

I get an errow when trying to print a file using GSprint with a wildcard (*) character.  It works fine if I take the "*" out and put in the actual file name.
I've attached a screen print of the error.

GPL GhostScript 9.00: Unrecoverable Error, exit code 1
Comment 1 Ray Johnston 2010-12-09 18:13:23 UTC
Note that gsprint documentation does not indicate that it can handle wildcards.

If all it does is pass the name on the command line to Ghostscript, then
Ghostscript does NOT expand wildcards (per design and the PostScript spec
for the 'file' or 'run' operators).

Ghostscript _can_ be used to perform wildcard expansion using the
'filenameforall' PostScript operator, but gsprint must send the PS sequence
to then run each of the files returned by filenameforall.

I'm inclined to close this as 'INVALID' since Ghostscript is working as
intended, but I'll leave that up to Russell.
Comment 2 bryan.sellens 2010-12-09 19:00:40 UTC
You can change it to Invalid.  I understand what your saying and working as designed is a good explanation.  Thanks!!
Comment 3 Russell Lang 2011-02-25 00:15:02 UTC
GSPrint does not expand wildcards.  You can use the Windows Command language to iterate for each filename.

for %i in (*) do echo %i
Comment 4 bryan.sellens 2011-02-25 12:44:57 UTC
This is off of the topic of this ticket but I'm attempting to use GSPrint to print a .ps file that requires pulling from multiple trays.  It's only pulling from 1 tray and I wasn't sure if this is a limitation of GSPrint or if I have an issue on the printer side.  Any help is greatly appreciated or if you could direct me to a blog where this could be answered that would be great!!  Thanks!!
Comment 5 Ken Sharp 2011-02-28 13:48:28 UTC
(In reply to comment #4)
> This is off of the topic of this ticket but I'm attempting to use GSPrint to
> print a .ps file that requires pulling from multiple trays.  It's only pulling
> from 1 tray and I wasn't sure if this is a limitation of GSPrint or if I have
> an issue on the printer side.  Any help is greatly appreciated or if you could
> direct me to a blog where this could be answered that would be great!! 

I suspect you cannot do this. Without knowing a lot more specifics about your environment (the target printer, how trays are controlled etc) I can't be certain, but what gsprint does, I think, is pass PostScript to Ghostscript which GS then converts into a bitmap image. 

GSPrint then draws the bitmap on a Windows Device context suitable for the printer. This then invokes the Windows printer driver specific to that printer, which sends the appropriate invocation to the actual printer which causes it to print the bitmap.

This is often a slow and inefficient way to print to a device, but it has the redeeming benefit that it works :-)

Any tray information in the original PostScript file is obviously lost when the file is rendered to a bitmap, so I don't see any way to achieve tray switching.

Closing this issue as the original question has already been answered.