I am working on converting some print forms to run through FreeBSD and ghostscript. I am trying to discover exactly what changes must be made to the form and data print files so that they will merge on a PCL5 printer.
The form overlay is created from LibreOffice draw and is printed to a file using a virtual printer created in CUPS using the hpcups_3 driver. The data file is created on another host running a legacy OS and is a simple ASCII text file with a PCL prefix string specifying the font to use. That font is the line-printer font built in to the printers that we use.
I have discovered the <esc> sequences that I must use to create and save a PCL macro. And I have the PCL escape sequences for calling a previously loaded PCL overlay. What I cannot seem to determine is where these sequences are supposed to be placed in the overlay PCL file and the data file.
The beginning of the overlay file initially printed from DRAW contains this:
I understand that the
The strings to create and load a form overlay macro from PCL source are:
How are these strings used in the overlay file?
Is it:
a.
b.
c.
d. something else ?
Do the strings
Given the the macro is successfully loaded, where in the data file does the
Note that both sets of commands are using index 22 to identify the form overlay macro to the printer. The macro index is an arbitrary value.
The form overlay is created from LibreOffice draw and is printed to a file using a virtual printer created in CUPS using the hpcups_3 driver. The data file is created on another host running a legacy OS and is a simple ASCII text file with a PCL prefix string specifying the font to use. That font is the line-printer font built in to the printers that we use.
I have discovered the <esc> sequences that I must use to create and save a PCL macro. And I have the PCL escape sequences for calling a previously loaded PCL overlay. What I cannot seem to determine is where these sequences are supposed to be placed in the overlay PCL file and the data file.
The beginning of the overlay file initially printed from DRAW contains this:
Code:
<esc>E<esc>%-12345X@PJL SET PAGEPROTECT=AUTO
@PJL SET RESOLUTION=600
@PJL SET DENSITY=5
@PJL SET DUPLEX=OFF
@PJL ENTER LANGUAGE=PCL
<esc>&l7h0m2a0s8c0o0E<esc>*o . . . <null><null>ú<null><ff><esc>*rC<esc>E<esc>%-12345X
I understand that the
<esc>%-12345X
string resets the printer and places it in PJL mode. So that is the delimiter for the beginning and end of a PCL print job. In the overlay the PCL job commands are pointless, so those can be removed. The <Esc> sequence after the PCL commands is the actual form I believe. The final <esc>%-12345X
resets the printer for the next job.The strings to create and load a form overlay macro from PCL source are:
Code:
<esc>&f0X # start of macro definition
<pcl code here> # macro definition
<esc>&f22y1X # end of macro definition id=22
<esc>&f22y10X # make macro permanent until printer reset
How are these strings used in the overlay file?
Is it:
a.
<esc>&f0X
<esc>%-12345X
. . . <esc>%-12345X
<esc>&f22y1X
<esc>&f22y10X
;b.
<esc>%-12345X
<esc>&f0X
. . . <esc>&f22y1X
<esc>&f22y1X
<esc>%-12345X
;c.
<esc>&f0X
. . . <esc>&f22y1X
<esc>&f22y1X
; ord. something else ?
Do the strings
<esc>&f0X
and <esc>&f22y1X
replace <esc>%-12345X
at the beginning and end of the overlay PCL code? Or do they used inside, or outside, thePCL job delimiter strings? Or is there some other arrangement that is used?Given the the macro is successfully loaded, where in the data file does the
<esc>&f22y4X
go to trigger the use of the overlay?Note that both sets of commands are using index 22 to identify the form overlay macro to the printer. The macro index is an arbitrary value.
Last edited: