Rocket U2 | UniVerse & UniData

 View Only
Expand all | Collapse all

PRINT statements and escape sequences (PCL)

  • 1.  PRINT statements and escape sequences (PCL)

    Posted 11-29-2023 16:20

    I'm attempting to adjust the pitch to 12 characters per inch so the invoice number (green box) will fit within the designated column:

    However, the output is not affected, and the HP printer just passes the code through as if it is text to be printed (yellow box).

    I'm using the following code with the intention of every subsequent print statement resulting in text that is 12 chars/in.

    X.ESC = CHAR(27)
    X.PCL.COMMAND = X.ESC:"(s12H"
    PRINT X.PCL.COMMAND

    Does anything need to be enabled on the printer (hp4350) for PCL commands to take effect?

    The printer in question will generate a PCL font list so I think that confirms the required software is present.

    Also, does every print statement have to include the escape sequence or can it just be invoked once and remain in effect until the page/job is finished?

    It's been 10+ years since I messed with this (at another site), but I don't recall having any trouble with it.



    ------------------------------
    Shawn Waldie
    enterprise application developer
    Rocket Forum Shared Account
    Los Angeles CA US
    ------------------------------


  • 2.  RE: PRINT statements and escape sequences (PCL)

    Posted 11-29-2023 20:22

    Hi Shawn,

    You need to send the decimal ESC not ASCII i.e. (27)(s12H

    Cheers



    ------------------------------
    Justin Gledhill
    Business Analyst
    Ecolab Incorporated
    NSW AU
    ------------------------------



  • 3.  RE: PRINT statements and escape sequences (PCL)

    Posted 11-30-2023 10:41

    Thank you for the feedback, Justin.

    All the other examples (unidata context) that I have reviewed have the escape character specified by using CHAR(27).

    And that is what I used with success in the past.



    ------------------------------
    Shawn Waldie
    enterprise application developer
    Rocket Forum Shared Account
    Los Angeles CA US
    ------------------------------



  • 4.  RE: PRINT statements and escape sequences (PCL)

    Posted 11-30-2023 17:50

    Interesting... I'm not familiar with UniData. Using UniVerse we are more in line with Mark's example... \d027 etc.



    ------------------------------
    Justin Gledhill
    Business Analyst
    Ecolab Incorporated
    NSW AU
    ------------------------------



  • 5.  RE: PRINT statements and escape sequences (PCL)

    Posted 11-30-2023 08:52

    I checked our invoice print routine and the 1st line shows as "\D027(s1p10v0s3b4099T" (\D027=Esc), which sets the
    font to courier bold.

    Also, the the driver for the print queue is set to "cat /uvsp/5SINORM - | lp -d hpit0".  It looks like this is what
    sets up the PCL.  (\D027=Esc)

    5SINORM
     Basic Editor           &UVSPOOL&                                     11-30-23
     Acct: UCPPGM           5SINORM                                       07:39:38
    0001:\D027(8U\D027(s0p21h0s3b4102T\D027&l8D\D027&l4E\D027&a10L
    EOI


    I have the following code in an INCLUDE so I don't have to remember all of the syntax.
    *****
        ESC = CHAR(27)
        HP.RESET = ESC:'*E'
        HP.GL2 = ESC:'%0B'  ;** HP-GL/2 mode
        HP.PCL = ESC:'%0A'  ;** PCL mode (default)
        HP.UNDLINE.FLOAT = ESC:'&d0D'
        HP.UNDLINE.FIXED = ESC:'&d3D'
        HP.NOLINE = ESC:'&d@'
        HP.FIXED = ESC:'(s0p'
        HP.PROP = ESC:'(s1p'
        HP.PORTRAIT = ESC:'&l0O'
        HP.LANDSCAPE = ESC:'&l1O'
        HP.SIMPLEX = ESC:'&l0S'
        HP.DUPLEX = ESC:'&l1S'
        HP.ENDPLEX = ESC:'%-12345X'
        HP.TBMARGIN = ESC:'&l'
        HP.TMARGIN = 'E'         ;** HP.TB.MARGIN:5:HP.TMARGIN
    ** FORM LENGTH
        HP.BMARGIN = 'L'         ;** HP.TB.MARGIN:76:HP.BMARGIN
        HP.FORMLEN = 'F'         ;** HP.TB.MARGIN:88:HP.FORMLEN
        HP.LRMARGIN = ESC:'&a'
        HP.LMARGIN = 'L'         ;** HP.LR.MARGIN:5:HP.LMARGIN
        HP.RMARGIN = 'M'         ;** HP.LR.MARGIN:5:HP.RMARGIN
        HP.CLR.HMARGIN = ESC:9 ;** CLEAR HORIZONTAL MARGINS
        HP.TRAY1 = ESC:'&l8H'
        HP.TRAY2 = ESC:'&l1H'
        HP.TRAY3 = ESC:'&l4H'
        HP.TRAY4 = ESC:'&l5H'  ;** 2000 SHEET
        HP.CPI = ''
        HP.4LPI = ESC:'&l4D'
        HP.6LPI = ESC:'&l6D'
        HP.8LPI = ESC:'&l8D'
        HP.10LPI = ESC:'&l10D'
        HP.12LPI = ESC:'&l12D'
        HP.14LPI = ESC:'&l14D'
        HP.16LPI = ESC:'&l16D'
        HP.300DPI = ESC:'*t300R'
        HP.600DPI = ESC:'*t600R'
        HP.HV.POS = ESC:'&a'   ;** ROWS/COLUMNS
        HP.VPOS = 'R'          ;** HP.HV.POS:5:HP.VPOS
        HP.HPOS = 'C'          ;** HP.HV.POS:10:HP.HPOS
        HP.HV.DPOS = ESC:'&p'  ;** DOTS
        HP.VDPOS = 'Y'         ;** HP.HV.DPOS:5:HP.VDPOS
        HP.HDPOS = 'X'         ;** HP.HV.DPOS:10:HP.HDPOS
        HP.HV.DPTPOS = ESC:'&a';** DECIPOINTS
        HP.VDPTPOS = 'Y'       ;** HP.HV.DPTPOS:5:HP.VDPTPOS
        HP.HDPTPOS = 'X'       ;** HP.HV.DPTPOS:10:HP.HDPTPOS
    ** HP SIMPLE COLOR PALLETE RGB
        HP.CLR.RGB = ESC:'*r3U'
        HP.CLR.RGB.BLACK = HP.CLR.RGB:ESC:'*v0S'
        HP.CLR.RGB.RED = HP.CLR.RGB:ESC:'*v1S'
        HP.CLR.RGB.GREEN = HP.CLR.RGB:ESC:'*v2S'
        HP.CLR.RGB.YELLOW = HP.CLR.RGB:ESC:'*v3S'
        HP.CLR.RGB.BLUE = HP.CLR.RGB:ESC:'*v4S'
        HP.CLR.RGB.MAGENTA = HP.CLR.RGB:ESC:'*v5S'
        HP.CLR.RGB.CYAN = HP.CLR.RGB:ESC:'*v6S'
        HP.CLR.RGB.WHITE = HP.CLR.RGB:ESC:'*v7S'
    ** SPECIAL EFFECTS ON FONTS
        HP.OUTLINE = ESC:'(s32S'
        HP.INLINE = ESC:'(s64S'
        HP.SHADOW = ESC:'(s128S'
        HP.SHADOW.OUT = ESC:'(s160S'
    ** DEFAULT FONTS
        HP.FONT.INITF = HP.FIXED
        HP.FONT.INITP = HP.PROP
        HP.FONT.INIT = ESC:'(s1P'
    ** PROPORTIONAL
        HP.ALBERTUS     = 'v0s0b4362T'    ;** HP.FONT.INIT:size:HP.ALBERTUS
        HP.ALBERTUS.B   = 'v0s3b4362T'
        HP.ALBERTUS.I   = 'v1s0b4362T'
        HP.ALBERTUS.B.I = 'v1s3b4362T'
        HP.ANTOLIVE     = 'v0s0b4168T'
        HP.ANTOLIVE.B   = 'v0s3b4168T'
        HP.ANTOLIVE.I   = 'v1s0b4168T'
        HP.ANTOLIVE.B.I = 'v1s3b4168T'
        HP.ARIAL     = 'v0s0b16602T'
        HP.ARIAL.B   = 'v0s3b16602T'
        HP.ARIAL.I   = 'v1s0b16602T'
        HP.ARIAL.B.I = 'v1s3b16602T'
        HP.CGTIMES     = 'v0s0b4101T'
        HP.CGTIMES.B   = 'v0s3b4101T'
        HP.CGTIMES.I   = 'v1s0b4101T'
        HP.CGTIMES.B.I = 'v1s3b4101T'
        HP.CGOMEGA     = 'v0s0b4113T'
        HP.CGOMEGA.B   = 'v0s3b4113T'
        HP.CGOMEGA.I   = 'v1s0b4113T'
        HP.CGOMEGA.B.I = 'v1s3b4113T'
        HP.CORONET     = 'v0s0b4116T'
        HP.CORONET.B   = 'v0s3b4116T'
        HP.CORONET.I   = 'v1s0b4116T'
        HP.CORONET.B.I = 'v1s3b4116T'
        HP.CLARENDON     = 'v0s0b4140T'
        HP.CLARENDON.B   = 'v0s3b4140T'
        HP.CLARENDON.I   = 'v1s0b4140T'
        HP.CLARENDON.B.I = 'v1s3b4140T'
        HP.COURIER     = 'v0s0b4099T'
        HP.COURIER.B   = 'v0s3b4099T'
        HP.COURIER.I   = 'v1s0b4099T'
        HP.COURIER.B.I = 'v1s3b4099T'
        HP.GARAMOND     = 'v0s0b4197T'
        HP.GARAMOND.B   = 'v0s3b4197T'
        HP.GARAMOND.I   = 'v1s0b4197T'
        HP.GARAMOND.B.I = 'v1s3b4197T'
        HP.GOTHIC     = 'v0s0b4102T'
        HP.GOTHIC.B   = 'v0s3b4102T'
        HP.GOTHIC.I   = 'v1s0b4102T'
        HP.GOTHIC.B.I = 'v1s3b4102T'
        HP.LPTR     = 'v0s0b0T'
        HP.LPTR.B   = 'v0s3b0T'
        HP.LPTR.I   = 'v1s0b0T'
        HP.LPTR.B.I = 'v1s3b0T'
        HP.MARIGOLD     = 'v0s0b16901T'
        HP.MARIGOLD.B   = 'v0s3b4297T'
        HP.MARIGOLD.I   = 'v1s0b4297T'
        HP.MARIGOLD.B.I = 'v1s3b4297T'
        HP.TIMESROMAN     = 'v0s0b16901T'
        HP.TIMESROMAN.B   = 'v0s3b16901T'
        HP.TIMESROMAN.I   = 'v1s0b16901T'
        HP.TIMESROMAN.B.I = 'v1s3b16901T'
        HP.UNIVERS     = 'v0s0b4148T'
        HP.UNIVERS.B   = 'v0s3b4148T'
        HP.UNIVERS.I   = 'v1s0b4148T'
        HP.UNIVERS.B.I = 'v1s3b4148T'
    ** FIXED
        HP.ALBERTUSF     = 'h0s0b4362T'    ;** HP.FONT.INIT:size:HP.ALBERTUS
        HP.ALBERTUSF.B   = 'h0s3b4362T'
        HP.ALBERTUSF.I   = 'h1s0b4362T'
        HP.ALBERTUSF.B.I = 'h1s3b4362T'
        HP.ANTOLIVEF     = 'h0s0b4168T'
        HP.ANTOLIVEF.B   = 'h0s3b4168T'
        HP.ANTOLIVEF.I   = 'h1s0b4168T'
        HP.ANTOLIVEF.B.I = 'h1s3b4168T'
        HP.ARIALF     = 'h0s0b16602T'
        HP.ARIALF.B   = 'h0s3b16602T'
        HP.ARIALF.I   = 'h1s0b16602T'
        HP.ARIALF.B.I = 'h1s3b16602T'
        HP.CGTIMESF     = 'h0s0b4101T'
        HP.CGTIMESF.B   = 'h0s3b4101T'
        HP.CGTIMESF.I   = 'h1s0b4101T'
        HP.CGTIMESF.B.I = 'h1s3b4101T'
        HP.CGOMEGAF     = 'h0s0b4113T'
        HP.CGOMEGAF.B   = 'h0s3b4113T'
        HP.CGOMEGAF.I   = 'h1s0b4113T'
        HP.CGOMEGAF.B.I = 'h1s3b4113T'
        HP.CORONETF     = 'h0s0b4116T'
        HP.CORONETF.B   = 'h0s3b4116T'
        HP.CORONETF.I   = 'h1s0b4116T'
        HP.CORONETF.B.I = 'h1s3b4116T'
        HP.CLARENDONF     = 'h0s0b4140T'
        HP.CLARENDONF.B   = 'h0s3b4140T'
        HP.CLARENDONF.I   = 'h1s0b4140T'
        HP.CLARENDONF.B.I = 'h1s3b4140T'
        HP.COURIERF     = 'h0s0b4099T'
        HP.COURIERF.B   = 'h0s3b4099T'
        HP.COURIERF.I   = 'h1s0b4099T'
        HP.COURIERF.B.I = 'h1s3b4099T'
        HP.GARAMONDF     = 'h0s0b4197T'
        HP.GARAMONDF.B   = 'h0s3b4197T'
        HP.GARAMONDF.I   = 'h1s0b4197T'
        HP.GARAMONDF.B.I = 'h1s3b4197T'
        HP.GOTHICF     = 'h0s0b4102T'
        HP.GOTHICF.B   = 'h0s3b4102T'
        HP.GOTHICF.I   = 'h1s0b4102T'
        HP.GOTHICF.B.I = 'h1s3b4102T'
        HP.LPTRF     = 'h0s0b0T'
        HP.LPTRF.B   = 'h0s3b0T'
        HP.LPTRF.I   = 'h1s0b0T'
        HP.LPTRF.B.I = 'h1s3b0T'
        HP.MARIGOLDF     = 'h0s0b16901T'
        HP.MARIGOLDF.B   = 'h0s3b4297T'
        HP.MARIGOLDF.I   = 'h1s0b4297T'
        HP.MARIGOLDF.B.I = 'h1s3b4297T'
        HP.TIMESROMANF     = 'h0s0b16901T'
        HP.TIMESROMANF.B   = 'h0s3b16901T'
        HP.TIMESROMANF.I   = 'h1s0b16901T'
        HP.TIMESROMANF.B.I = 'h1s3b16901T'
        HP.UNIVERSF     = 'h0s0b4148T'
        HP.UNIVERSF.B   = 'h0s3b4148T'
        HP.UNIVERSF.I   = 'h1s0b4148T'
        HP.UNIVERSF.B.I = 'h1s3b4148T'
        ARIAL.6 = HP.FONT.INITP:6:HP.ARIAL
        ARIAL.6B = HP.FONT.INITP:6:HP.ARIAL.B
        ARIAL.8 = HP.FONT.INITP:8:HP.ARIAL
        ARIAL.8B = HP.FONT.INITP:8:HP.ARIAL.B
        ARIAL.10 = HP.FONT.INITP:10:HP.ARIAL
        ARIAL.10B = HP.FONT.INITP:10:HP.ARIAL.B
        ARIAL.12 = HP.FONT.INITP:12:HP.ARIAL
        ARIAL.12B = HP.FONT.INITP:12:HP.ARIAL.B
        ARIAL.14 = HP.FONT.INITP:14:HP.ARIAL
        ARIAL.14B = HP.FONT.INITP:14:HP.ARIAL.B
        ARIAL.14BI = HP.FONT.INITP:14:HP.ARIAL.B.I
        ARIAL.16 = HP.FONT.INITP:16:HP.ARIAL
        ARIAL.16B = HP.FONT.INITP:16:HP.ARIAL.B
        ARIAL.16BI = HP.FONT.INITP:16:HP.ARIAL.B.I
        ARIAL.20B = HP.FONT.INITP:20:HP.ARIAL.B
        ARIAL.22B = HP.FONT.INITP:22:HP.ARIAL.B
        ARIAL.24B = HP.FONT.INITP:24:HP.ARIAL.B
        ARIAL.26B = HP.FONT.INITP:26:HP.ARIAL.B
        ARIALF.2 = HP.FONT.INITF:2:HP.ARIALF
        ARIALF.2B = HP.FONT.INITF:2:HP.ARIALF.B
        ARIALF.3 = HP.FONT.INITF:3:HP.ARIALF
        ARIALF.3B = HP.FONT.INITF:3:HP.ARIALF.B
        ARIALF.4 = HP.FONT.INITF:4:HP.ARIALF
        ARIALF.4B = HP.FONT.INITF:4:HP.ARIALF.B
        ARIALF.6 = HP.FONT.INITF:6:HP.ARIALF
        ARIALF.6B = HP.FONT.INITF:6:HP.ARIALF.B
        ARIALF.8 = HP.FONT.INITF:8:HP.ARIALF
        ARIALF.8B = HP.FONT.INITF:8:HP.ARIALF.B
        ARIALF.10 = HP.FONT.INITF:10:HP.ARIALF
        ARIALF.10B = HP.FONT.INITF:10:HP.ARIALF.B
        ARIALF.12 = HP.FONT.INITF:12:HP.ARIALF
        ARIALF.12B = HP.FONT.INITF:12:HP.ARIALF.B
        ARIALF.14 = HP.FONT.INITF:14:HP.ARIALF
        ARIALF.14B = HP.FONT.INITF:14:HP.ARIALF.B
        ARIALF.16 = HP.FONT.INITF:16:HP.ARIALF
        ARIALF.16B = HP.FONT.INITF:16:HP.ARIALF.B
        COURIER.6 = HP.FONT.INITP:6:HP.COURIER
        COURIER.6B = HP.FONT.INITP:6:HP.COURIER.B
        COURIER.8 = HP.FONT.INITP:8:HP.COURIER
        COURIER.8B = HP.FONT.INITP:8:HP.COURIER.B
        COURIER.10 = HP.FONT.INITP:10:HP.COURIER
        COURIER.10B = HP.FONT.INITP:10:HP.COURIER.B
        COURIER.11 = HP.FONT.INITP:11:HP.COURIER
        COURIER.11B = HP.FONT.INITP:11:HP.COURIER.B
        COURIER.12 = HP.FONT.INITP:12:HP.COURIER
        COURIER.12B = HP.FONT.INITP:12:HP.COURIER.B
        COURIER.12BI = HP.FONT.INITP:12:HP.COURIER.B.I
        COURIER.14 = HP.FONT.INITP:14:HP.COURIER
        COURIER.14B = HP.FONT.INITP:14:HP.COURIER.B
        COURIER.14BI = HP.FONT.INITP:14:HP.COURIER.B.I
        COURIER.16 = HP.FONT.INITP:16:HP.COURIER
        COURIER.16B = HP.FONT.INITP:16:HP.COURIER.B
        COURIER.16BI = HP.FONT.INITP:16:HP.COURIER.B.I
        COURIERF.8 = HP.FONT.INITF:8:HP.COURIERF
        COURIERF.8B = HP.FONT.INITF:8:HP.COURIERF.B
        COURIERF.10 = HP.FONT.INITF:10:HP.COURIERF
        COURIERF.10B = HP.FONT.INITF:10:HP.COURIERF.B
        COURIERF.11 = HP.FONT.INITF:11:HP.COURIERF
        COURIERF.11B = HP.FONT.INITF:11:HP.COURIERF.B
        COURIERF.12 = HP.FONT.INITF:12:HP.COURIERF
        COURIERF.12B = HP.FONT.INITF:12:HP.COURIERF.B
        COURIERF.13 = HP.FONT.INITF:13:HP.COURIERF
        COURIERF.13B = HP.FONT.INITF:13:HP.COURIERF.B
        COURIERF.14 = HP.FONT.INITF:14:HP.COURIERF
        COURIERF.14B = HP.FONT.INITF:14:HP.COURIERF.B
        COURIERF.16 = HP.FONT.INITF:16:HP.COURIERF
        COURIERF.16B = HP.FONT.INITF:16:HP.COURIERF.B
        COURIERF.18 = HP.FONT.INITF:18:HP.COURIERF
        COURIERF.18B = HP.FONT.INITF:18:HP.COURIERF.B
        COURIERF.20 = HP.FONT.INITF:20:HP.COURIERF
        COURIERF.20B = HP.FONT.INITF:20:HP.COURIERF.B
        COURIERF.22 = HP.FONT.INITF:22:HP.COURIERF
        COURIERF.22B = HP.FONT.INITF:22:HP.COURIERF.B
        GARAMOND.10 = HP.FONT.INITP:10:HP.GARAMOND
        GARAMOND.10B = HP.FONT.INITP:10:HP.GARAMOND.B
        GARAMOND.12 = HP.FONT.INITP:12:HP.GARAMOND
        GARAMOND.12B = HP.FONT.INITP:12:HP.GARAMOND.B
        GARAMOND.14 = HP.FONT.INITP:14:HP.GARAMOND
        GARAMOND.14B = HP.FONT.INITP:14:HP.GARAMOND.B
        GARAMOND.16BI = HP.FONT.INITP:16:HP.GARAMOND.B.I
        GARAMONDF.10 = HP.FONT.INITF:10:HP.GARAMONDF
        GARAMONDF.10B = HP.FONT.INITF:10:HP.GARAMONDF.B
        GARAMONDF.12 = HP.FONT.INITF:12:HP.GARAMONDF
        GARAMONDF.12B = HP.FONT.INITF:12:HP.GARAMONDF.B
        GARAMONDF.14 = HP.FONT.INITF:14:HP.GARAMONDF
        GARAMONDF.14B = HP.FONT.INITF:14:HP.GARAMONDF.B
        TIMESROMAN.8 = HP.FONT.INITP:8:HP.TIMESROMAN
        TIMESROMAN.8B = HP.FONT.INITP:8:HP.TIMESROMAN.B
        TIMESROMAN.10 = HP.FONT.INITP:10:HP.TIMESROMAN
        TIMESROMAN.10B = HP.FONT.INITP:10:HP.TIMESROMAN.B
        TIMESROMAN.12 = HP.FONT.INITP:12:HP.TIMESROMAN
        TIMESROMAN.12B = HP.FONT.INITP:12:HP.TIMESROMAN.B
        TIMESROMAN.14 = HP.FONT.INITP:14:HP.TIMESROMAN
        TIMESROMAN.14B = HP.FONT.INITP:14:HP.TIMESROMAN.B
        TIMESROMAN.16BI = HP.FONT.INITP:16:HP.TIMESROMAN.B.I
        TIMESROMANF.10 = HP.FONT.INITF:10:HP.TIMESROMANF
        TIMESROMANF.10B = HP.FONT.INITF:10:HP.TIMESROMANF.B
        TIMESROMANF.12 = HP.FONT.INITF:12:HP.TIMESROMANF
        TIMESROMANF.12B = HP.FONT.INITF:12:HP.TIMESROMANF.B
        TIMESROMANF.14 = HP.FONT.INITF:14:HP.TIMESROMANF
        TIMESROMANF.14B = HP.FONT.INITF:14:HP.TIMESROMANF.B



    ------------------------------
    Mark Vander Veen
    Project Leader, System Administrator
    University of Chicago Distribution Center
    Chicago IL US
    ------------------------------



  • 6.  RE: PRINT statements and escape sequences (PCL)

    Posted 11-30-2023 10:45

    Thank you, Mark.

    I'll check our printer setup.

    BTW, i'm digging that INCLUDE record.



    ------------------------------
    Shawn Waldie
    enterprise application developer
    Rocket Forum Shared Account
    Los Angeles CA US
    ------------------------------



  • 7.  RE: PRINT statements and escape sequences (PCL)
    Best Answer

    Posted 12-01-2023 10:29

    I have run into similar issue and it came down to the defined printer driver modifying the pcl commands being sent.  Try defining the printer as a generic text or raw (as opposed to a HP driver) and see if it resolves your issue.  You typically can define multiple queues with different drivers going to the same physical printer to handle the various types of jobs.



    ------------------------------
    doug miller
    dir tech services
    Rocket Forum Shared Account
    Carrollton TX US
    ------------------------------



  • 8.  RE: PRINT statements and escape sequences (PCL)

    Posted 12-01-2023 10:44

    Don Miller's comment is correct, all of our printers are set up as generic.  I also set them up in AIX with 2000 columns to deal with the added coding for PCL.



    ------------------------------
    Mark Vander Veen
    Project Leader, System Administrator
    University of Chicago Distribution Center
    Chicago IL US
    ------------------------------



  • 9.  RE: PRINT statements and escape sequences (PCL)

    Posted 12-05-2023 11:00

    Thank you, Doug and Mark.

    We've adjusted the printer in question to use the generic text driver instead of the HP postscript driver, and we're now waiting for feedback from the user again.



    ------------------------------
    Shawn Waldie
    enterprise application developer
    Rocket Forum Shared Account
    Los Angeles CA US
    ------------------------------



  • 10.  RE: PRINT statements and escape sequences (PCL)

    Posted 02-09-2024 12:32

    I can finally confirm that this worked.
    Though I couldn't get two other options to work (with 'generic' in the name),  one labeled 'Local Raw Printer (grayscale)' did the trick.

    Thank you!

    And a big thank you to everyone else who offered very helpful feedback.



    ------------------------------
    Shawn Waldie
    enterprise application developer
    Rocket Forum Shared Account
    Los Angeles CA US
    ------------------------------



  • 11.  RE: PRINT statements and escape sequences (PCL)

    Posted 12-05-2023 02:38

    Hey Shawn, when messing with PCL escape codes, it is always good practice to first send an ESC:'E' to reset the printer. Then you can squirt in your desired combo of configurations followed by the job data and lastly followed by another ESC:'E' to reset and print the last page.

    The reason the printer is printing the s12 and not interpretting it as a PCL command might be because the printer cannot deal with that option in its current state. Resetting it beforehand should do the trick.

    Also there's a nice little feature in the UV spooler (in unix)  that allows you to cat a file to standard-in and standard-out effectively wrapping the print job in a header and footer. In these files you can place PCL commands, assign the files to a print queue and each time you print to that queue you get that particular PCL configuration sent to the printer for each job. Easy to then write a maintenance routine to set the files to do portrait/landscape, font stuff and the like.

    Hope this helps
    Cheers



    ------------------------------
    Peter Cheney
    Developer and Systems Superstar
    Firstmac
    Brisbane Qld Australia
    ------------------------------



  • 12.  RE: PRINT statements and escape sequences (PCL)

    Posted 12-05-2023 11:05

    Thank you for the suggestions, Peter.

    And I recall using this reset-character-sending technique in the past, so thank you for the reminder!



    ------------------------------
    Shawn Waldie
    enterprise application developer
    Rocket Forum Shared Account
    Los Angeles CA US
    ------------------------------