• Unable to view PJL data in .pcl when GhostScript is used to convert Pos

    From pvrbre@gmail.com@21:1/5 to All on Tue Dec 3 03:18:48 2019
    I am using GNU GhostScript for PostScript to PCL6 conversion in Ubuntu OS.

    The command is as follows:


    Test Command 1:

    gs -o testoutpot.pxl -sDEVICE=pxlcolor test.ps

    The testoutpot.pxl file always contains 2 PJL data.

    @PJL SET RESOLUTION=600
    @PJL ENTER LANGUAGE = PCLXL



    Test Command 2:

    gs -sPAPERSIZE=a4 -o tst9.pxl -sDEVICE=pxlcolor prealse.ps


    The tst9.pxl file always contains 2 PJL data.

    @PJL SET RESOLUTION=600
    @PJL ENTER LANGUAGE = PCLXL


    Why always 2 PJL settings are irrespective of number of settings like (PAPERSIZE, PDFPassword , FirstPage ..etc)


    Please help me how to get corresponding PJL data in the output pxl file.

    Also how can i give printer custom parameters to the Ghostscript as command line args.


    Thank you so much for understanding my problem.


    Regards,
    pvrbre

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Leese@21:1/5 to pvrbre@gmail.com on Tue Dec 3 14:35:23 2019
    pvrbre@gmail.com wrote:
    I am using GNU GhostScript for PostScript to PCL6 conversion in Ubuntu OS.

    The command is as follows:


    Test Command 1:

    gs -o testoutpot.pxl -sDEVICE=pxlcolor test.ps

    The testoutpot.pxl file always contains 2 PJL data.

    @PJL SET RESOLUTION=600
    @PJL ENTER LANGUAGE = PCLXL
    ...
    Why always 2 PJL settings are irrespective of number of settings like (PAPERSIZE, PDFPassword , FirstPage ..etc)

    I have never used -sDEVICE=pxlcolor. I have
    used -sDEVICE=pnggray, where I include the
    options:
    -g400x400 -r72 -dTextAlphaBits=4

    Have you tried setting the resolution using
    -rRES or -rXRESxYRES ?

    Please help me how to get corresponding PJL data in the output pxl file.

    Also how can i give printer custom parameters to the Ghostscript as command line args.

    The appropriate manual page appears to be at: https://www.ghostscript.com/doc/current/Use.htm

    Thank you so much for understanding my problem.

    Can't say that I have understood it.

    --
    Regards,
    Martin Leese
    E-mail: please@see.Web.for.e-mail.INVALID
    Web: http://members.tripod.com/martin_leese/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From pvrbre@gmail.com@21:1/5 to All on Tue Dec 3 20:38:08 2019
    Dear Martin Leese,

    Thank you so much for you suggestions.

    In my case i have to use only color Device.

    I could able to change only Resolution PJL value.

    Moreover, what ever arguments i gave in the command line only 2 PJL data available.

    The ouputfile.pxl file always contains 2 PJL data.

    @PJL SET RESOLUTION=600
    @PJL ENTER LANGUAGE = PCLXL


    Also how can i give custom parameters (printer's) to the Ghostscript in command line args.


    Regards,
    pvrbre

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From luser droog@21:1/5 to pvr...@gmail.com on Tue Dec 3 22:00:20 2019
    On Tuesday, December 3, 2019 at 5:18:49 AM UTC-6, pvr...@gmail.com wrote:
    I am using GNU GhostScript for PostScript to PCL6 conversion in Ubuntu OS.

    The command is as follows:


    Test Command 1:

    gs -o testoutpot.pxl -sDEVICE=pxlcolor test.ps

    The testoutpot.pxl file always contains 2 PJL data.

    @PJL SET RESOLUTION=600
    @PJL ENTER LANGUAGE = PCLXL



    Test Command 2:

    gs -sPAPERSIZE=a4 -o tst9.pxl -sDEVICE=pxlcolor prealse.ps


    The tst9.pxl file always contains 2 PJL data.

    @PJL SET RESOLUTION=600
    @PJL ENTER LANGUAGE = PCLXL


    Why always 2 PJL settings are irrespective of number of settings like (PAPERSIZE, PDFPassword , FirstPage ..etc)


    Please help me how to get corresponding PJL data in the output pxl file.

    Also how can i give printer custom parameters to the Ghostscript as command line args.


    Thank you so much for understanding my problem.


    I find a specification for PCL6 here: https://www.undocprint.org/formats/page_description_languages/pcl_xl

    According to the 2.0 spec, section 1.5 Pages:

    Pages have attributes that define and effect the real page received or viewed by
    a person. For example, the size, type, source, and destination for the physical
    page media are attributes that may be associated with a page.

    So it appears that setting the PAGESIZE may not cause a @PJL line
    because it's not a global parameter but a per-page parameter.
    So, I suspect that the settings are being used, but you may be
    looking in the wrong place to verify it.

    On page 51, under the BeginPage operator there are 2 examples:

    Beginning a simple page.
    ubyte ePortraitOrientation Orientation
    ubyte eLetterPaper MediaSize
    BeginPage

    Beginning a page printing on Executive sized paper with duplexing enabled.
    ubyte ePortraitOrientation Orientation
    ubyte eExecPaper MediaSize
    ubyte eDuplexVerticalBinding DuplexPageMode
    BeginPage

    I'm not sure if these are always encoded as plain text, so it may
    still to be difficult to search for and verify. But it appears to
    me that you should be looking for a MediaSize parameter to the
    BeginPage operator.

    -droog

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From pvrbre@gmail.com@21:1/5 to All on Wed Dec 4 20:47:03 2019
    Dear droog,

    Thank you so much for your response.

    i have read below 2.0 spec and anble to understand.
    According to the 2.0 spec, section 1.5 Pages:

    i am not sure how to set the

    gs -o outputpcl.pcl -sDEVICE=pxlcolor -sCSTOMPrameter=value test.ps


    The outputpcl.pcl file always contains 2 PJL data.

    @PJL SET RESOLUTION=600
    @PJL ENTER LANGUAGE = PCLXL


    The "CSTOMPrameter" is not showing in as PJL data.


    Regards,
    pvrbre

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From luser droog@21:1/5 to pvr...@gmail.com on Wed Dec 4 21:06:32 2019
    On Wednesday, December 4, 2019 at 10:47:04 PM UTC-6, pvr...@gmail.com wrote:
    Dear droog,

    Thank you so much for your response.

    i have read below 2.0 spec and anble to understand.
    According to the 2.0 spec, section 1.5 Pages:

    i am not sure how to set the

    gs -o outputpcl.pcl -sDEVICE=pxlcolor -sCSTOMPrameter=value test.ps


    The outputpcl.pcl file always contains 2 PJL data.

    @PJL SET RESOLUTION=600
    @PJL ENTER LANGUAGE = PCLXL


    The "CSTOMPrameter" is not showing in as PJL data.



    I don't know what CSTOMPrameter is supposed to do. It's not listed
    in Use.htm for gs. And I can't find it in the PCL spec.

    Using -sname=value just makes a definition ("sets a variable") in
    the postscript interpreter. But unless it is meaningful to the
    interpreter or the output device, then it's not going to do anything.

    In order for a parameter to show in the @PJL lines, the output device
    has to understand it and convert it to a format that is meaningful
    in the PCL language.

    I suspect you may be having an X/Y problem. We can help with details,
    but it's not clear what the big picture is. What are you trying to do
    that needs this?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From pvrbre@gmail.com@21:1/5 to All on Wed Dec 4 23:04:27 2019
    Dear droog,

    Thank you so much for your quick response and help.

    Sorry for confusing with "CSTOMPrameter". It is typo.

    I mean to say Printer's "Custom Parameter".

    I will brief my overall Problem statement:

    We will print the job from printer (print job data can be text/raster)

    I need help in doing the below flow.

    text/raster data from printer --> convert the print data to PostScript --> PostScript to PCL6 conversion (PS to pcl6 using GNU GhostScript) --> Printer.

    I did not get any good links/info/material to do the above task.

    It will be great if i can get any good links/info/material.


    Regards,
    pvrbre

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From luser droog@21:1/5 to pvr...@gmail.com on Thu Dec 5 00:05:36 2019
    On Thursday, December 5, 2019 at 1:04:28 AM UTC-6, pvr...@gmail.com wrote:
    Dear droog,

    Thank you so much for your quick response and help.

    Sorry for confusing with "CSTOMPrameter". It is typo.

    I mean to say Printer's "Custom Parameter".

    I will brief my overall Problem statement:

    We will print the job from printer (print job data can be text/raster)

    I need help in doing the below flow.

    text/raster data from printer --> convert the print data to PostScript --> PostScript to PCL6 conversion (PS to pcl6 using GNU GhostScript) --> Printer.

    I did not get any good links/info/material to do the above task.

    It will be great if i can get any good links/info/material.


    So, the final Printer needs to do something different that the first
    printer? What is the custom parameter supposed to do?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From pvrbre@gmail.com@21:1/5 to All on Thu Dec 5 00:44:56 2019
    Dear droog,

    Thank you so much for the Reply.

    Need to Print from PC --> Printer through PCL6/PCLXL driver.

    i.e.

    text/raster data from PC --> convert the print data to PostScript --> PostScript to PCL6 conversion (PS to pcl6 using GNU GhostScript) --> Printer.

    I will be using GNU GhostScript (Command prompt) from shell script for PS to PCL6/PCLXL conversion.

    custom parameters like number of Duplex settings,Input Paper and Output paper info, Job info...etc.

    I am not able to understand overall flow and how to do.

    Please help me in this regard.

    Regards,
    pvrbre

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From luser droog@21:1/5 to pvr...@gmail.com on Thu Dec 5 19:51:01 2019
    On Thursday, December 5, 2019 at 2:44:57 AM UTC-6, pvr...@gmail.com wrote:
    Dear droog,

    Thank you so much for the Reply.

    Need to Print from PC --> Printer through PCL6/PCLXL driver.

    i.e.

    text/raster data from PC --> convert the print data to PostScript --> PostScript to PCL6 conversion (PS to pcl6 using GNU GhostScript) --> Printer.

    I will be using GNU GhostScript (Command prompt) from shell script for PS to PCL6/PCLXL conversion.

    custom parameters like number of Duplex settings,Input Paper and Output paper info, Job info...etc.

    I am not able to understand overall flow and how to do.

    Please help me in this regard.

    Are you trying to print from GUI software like a Word Processor or Web
    Browser? If so, then I think you should be using CUPS and let it handle
    the details. It should give you options in the Print dialog box.

    https://www.cups.org/documentation.html

    Fair warning: I haven't actually used CUPS myself. But it looks like
    you need to run the cups(1) program which will launch a GUI window,
    then go into the Administration tab and install the printer there.
    Then you should be able to print from most applications.

    There is a mailing list for CUPS.

    https://lists.cups.org/mailman/listinfo/cups

    Also you might be able to get help for specific issues at Unix.SE

    https://unix.stackexchange.com/questions/tagged/cups

    Using ghostscript from the command line is typically for more specialized tasks. Like if you have some old or custom software that produces PS
    output. But setting specific options is going to be a little different
    for each specific option. That's why it's so hard for any of us to point
    you to how to do it in general.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)