Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Postscript on hp PS driver
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

Report this thread to moderator Post Follow-up to this message
Old Post
diana.davidson@corrs.com.au
02-18-08 10:02 AM


Re: Postscript on hp PS driver
diana.davidson@corrs.com.au wrote:
> 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

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

Helge

--
Helge Blischke
Softwareentwicklung

H.Blischke@acm.org

Report this thread to moderator Post Follow-up to this message
Old Post
Helge Blischke
02-18-08 01:18 PM


Re: Postscript on hp PS driver
diana.davidson@corrs.com.au wrote:
> 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

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,,
Helge

--
Helge Blischke
Softwareentwicklung

H.Blischke@acm.org

Report this thread to moderator Post Follow-up to this message
Old Post
Helge Blischke
02-19-08 01:26 PM


Re: Postscript on hp PS driver
Hey Helge

thank you for your suggestion.

=2E..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}=3Dstring
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=A0am, Helge Blischke <h.blisc...@srz.de> wrote:
> diana.david...@corrs.com.au wrote: 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> 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
> =A0 =A0 =A0 =A0 /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
> =A0 =A0 =A0 =A0 %%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,,
> Helge
>
> --
> Helge Blischke
> Softwareentwicklung
>
> H.Blisc...@acm.org- Hide quoted text -
>
> - Show quoted text -


Report this thread to moderator Post Follow-up to this message
Old Post
diana.davidson@corrs.com.au
03-25-08 03:25 AM


Re: Postscript on hp PS driver
diana.davidson@corrs.com.au wrote:
> 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:
> 
>
>

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.Blischke@acm.org

Report this thread to moderator Post Follow-up to this message
Old Post
Helge Blischke
03-27-08 01:14 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PostScript archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:33 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.