Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Postscript on hp PS driver

23 views
Skip to first unread message

diana.d...@corrs.com.au

unread,
Feb 18, 2008, 12:33:23 AM2/18/08
to
Our current environment is Lexmark MFD's, with PS3 drivers, and
printer overlay files .PS stored on flash memory.

We're currently trialing a hp printer.

To make it easier Ive installed HP 9050 PS drivers, I couldnt find PS3
drivers perhaps they dont exist.

Flash memory is not installed yet on the HP printer, so for now a hard
disk has been installed. And Ive downloaded the .PS printer overlay
files onto the harddisk. In the HP environment overlays are called
macro files.

To call overlays, in the Word document header a print fieldcode is
inserted with the overlay name.

Using the same code to call the hp files the result is the document
prints but without the overlay.

I began to analyse the .PRN files generated by HP & Lexmark drivers.

I noticed the postscript commands for lexmark and hp are different.


HP to setup the environment have the command:

%%BeginResource: file <name>

for example:

%%BeginResource: file Pscript_Win_Basic 5.0 0

this command calls the Pscript5.dll


Lexmark to call the overlay file use the same command ie

%%BeginResource: file <name>

eg

%%BeginResource: file Lexmark_Overlay
/GetOvr{/Demo ed/overlay ed/MacroSave save def/showpage{}bd Demo 1 eq
{statusdict begin false setfilenameextend end}if/htest false def
overlay{pop
/htest true def}=string filenameforall htest{overlay run}{100 100
moveto
/Helvetica findfont 20 scalefont setfont overlay show( is not
loaded.)show showpage stop}ifelse Demo 1 eq{statusdict begin true
setfilenameextend
end}if MacroSave restore} bd
%%EndResource
(MEL_LTR_PS) 0 GetOvr


Lexmark to setup the environment use the command:

%%BeginResource: procset NTPSOct95

Is it possible macro commands to call files stored on hp printer maybe
different? I wouldnt have thought so as Postscript language is the
same.
Do you have info that contains commands for hp postscript macros and
overlay files?
Is this even possible on the hp printer? as hp predominatly work with
PCL. Going to PCL will be alot of work, as we will have to change
print code to call overlays & change printer drivers.
Can you please point me in the right direction.

many thanks
diana

Helge Blischke

unread,
Feb 18, 2008, 7:05:34 AM2/18/08
to

Could you please supply a sample file for both of these printers?

Helge

--
Helge Blischke
Softwareentwicklung

H.Bli...@acm.org

Helge Blischke

unread,
Feb 19, 2008, 8:51:20 AM2/19/08
to

Diana,

thanks for the sample files. I guess I can give you some hints:

First, the Lexmark driver you are using is based on M$'s NT4
(kernel mode) driver software (I know it from the "NTPSOct95"
dictionary name). And that driver emits a PostScript prolog
which defines
/ed {exch def}bind def
This definition is missing in the driver DLL used for the HP
printer (which is the user mode driver Pscript 5.x). Thus, for
your HP printer(s), you need to edit the PostScript code
that runs the oberlay: Insert the definition as listed above
just behind the line
%%BeginResource: file Lexmark_Overlay
Otherwise you will get a PostScript error like
"undefined: ed".

Second, the Lexmark flash memory firmware automatically
adds a filename extension to the file name supplied by
the PostScript code: the "MEL_LTR_PS" file in your
sample files gets stored in the Lexmark's flash memory as
"MEL_LTR_PS.data". Note that this is a proprietary Lexmark
feature; on your HP printer's hard disk you need to deal
with the real filename instead.

As I'm only hardly used to M$ Word, I'd suggest to ask
one of your local IT gurus to properly set up your Word
macros for use with the HP printers.

Feel free to ask if you need to.

Good luck,,

diana.d...@corrs.com.au

unread,
Mar 24, 2008, 9:32:02 PM3/24/08
to
Hey Helge

thank you for your suggestion.

...yes ive been plugging away at this, and the definition you
mentioned has to be placed in the correct location in the fieldcode.

This was the working solution...

{ PRINT \p page "%%BeginResource: file Lexmark_Overlay /ed {exch
def}bind def /GetOvr{/Demo ed/overlay ed/MacroSave save def/


showpage{}bd Demo 1 eq {statusdict begin false setfilenameextend
end}if/htest false def overlay{pop /htest true def}=string
filenameforall htest{overlay run}{100 100 moveto /Helvetica findfont
20 scalefont setfont overlay show( is not loaded.)show showpage
stop}ifelse Demo 1 eq{statusdict begin true setfilenameextend end}if

MacroSave restore} bd %%EndResource (MEL_LTR_PS) 0 GetOvr" \*
MERGEFORMAT }

this postscript code now works on the hp printers and calls the
overlay file (form).

The postscript code also has working error handling code.

If for some reason, the overlay does not exist on the printer hard
disk, (eg. sys admins may have accidentally forgotten to download the
file) I wanted to display/ print a meaningful message to assist
Helpdesk and Technology in troubleshooting.
as previously was printing the standard postscript error message

ERROR:
OFFENDING COMMAND:


thank you again Helge

have a good day :)

diana

On Feb 20, 12:51 am, Helge Blischke <h.blisc...@srz.de> wrote:

> H.Blisc...@acm.org- Hide quoted text -
>
> - Show quoted text -

Helge Blischke

unread,
Mar 27, 2008, 9:12:19 AM3/27/08
to

If you are able to edit the PS snippet that renders
the oberlay, change the
{overlay run}
to
{{overlay run}stopped


{100 100 moveto /Helvetica findfont 20 scalefont setfont

overlay show ( failed!) show showpage stop}if}
(Note, nit tested, as I have no printer that knows the
setfilenamextend operator).

Helge


--
Helge Blischke
Softwareentwicklung

H.Bli...@acm.org

0 new messages