D3 and mvBase

 View Only
  • 1.  Print queue - Postscript to PCL printer

    Posted 03-12-2024 19:07

    Good afternoon,

    D3 hosted on a Windows 2008R2 Server

    I have recently learned how to add printers to the D3 user-coldstart macro. This is the third printer I have added. The two previous are working perfectly.

    The last printer I created using a Brother printer (PCL) Windows driver. However all the text coming out of the printer starts

    with %!, which is an indicator of a postscript text stream. This causes pages of postrscript text to spew out of the printer.

    I have tried:

     changing the driver

    removing and adding the queue again

    using a new queue (eg; added a new port 15 and 16) no difference

    We have 14 printers that work, this one is giving me fits.

    Ideas welcome.

    Dumping the printer is an option..but just in case

    Bret Stern



    ------------------------------
    Bret Stern
    President
    Rocket Forum Shared Account
    ------------------------------


  • 2.  RE: Print queue - Postscript to PCL printer

    PARTNER
    Posted 03-13-2024 05:46

    Ahh yes, the delights of printers!

    I'm making a bunch of assumptions here; the biggest being you are using the dev-make command with the NTPrinter syntax; as per the manual?

    If so, [and you have not specified the model of printer, nor the model of the 'working' printers]; then one common issue is the printer itself is a 'GDI' printer. These are typically the 'cheaper' printers and my crude understanding of a GDI vs non-GDI printer is that a GDI printer requires the 'rendering' to occur on the system [Windows in this case] doing the heavy lifting instead of the print 'engine' inside the printer. Thus the printer is cheaper.

    Now, back in the day when I had this issue; I used to insist my clients never used a GDI printer; and always used a 'generic' PCL-5 driver because the output from d3 was really, really simple stuff suitable more for a dot-matrix printer; with embedded ASCII control characters; thus the driver didn't really need to do anything.

    Later, I learned there is a GDI printer 'option' for the dev-make command, but to me it all sounds too hard:

    NTPrinter

    Shared Windows Printer process. The device number is the PIB number of the printer process. All output to that PIB is directed to the associated Windows printer device. This form is used to start the D3 Pick serial printer so all the functionality of the traditional D3 Spooler can be used.

    The device number and the port number specified in the associated startptr command must be identical.

    The option string specifies the printer to use. Note that the page-eject or leading page-eject options are then controlled by the startptr command.

    The printer device name is the name of the device as defined by the Windows Print Manager. The printer can be a local or a network printer. On Windows, the printer path name should be used. For example: \\CDR\\HP-5L

    Note:Appending the printer port with ,wingdiprinter creates a Windows GDI printer. See Windows printer interface for more information.

    The name to use is the name that displays in the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\

    The linked page in the reference manual then says:

    Configuring a Windows printer for the Windows GDI driver

    Configuring a Windows printer for the Windows GDI Driver entails creating the Windows printer device and then associating a spooler assignment with the Windows printer control item in the DEVICES file.

    1. Run the dev-make command to configure a Windows printer. This requires specifying a printer type of NTPrinter and a printer path appended with ,wingdiprinter. For example:

      dev-make –t NTPrinter -n 100 -a "\\Svr-print\SPP-HP4200,wingdiprinter"
      
      Note:If the printer path doesn't have ,wingdiprinter appended to it, the standard printer process code is configured. See dev-make command (Windows) for more information on creating printer devices.
    2. Run the startptr command to start the printer.

    3. Execute the assignfq and sp-assign commands to associate a spooler assignment with the Windows printer control item in the DEVICES file. The example below illustrates associating a spooler assignment with a Windows printer control item:

      assignfq 1,
      wincontrolitem
      sp-assign f1
      

      where wincontrolitem  is the Windows printer control item (DEVICES file, item ID, wincontrolitem).

      Warning: The specified wincontrolitem is limited to a maximum of 12 characters.

      See sp-assign command and assignfq (Windows) command for more information on associating spooler assignments.

    4. Create a program that employs @() function codes to embed character sequences into the print data stream. See the Program Examples section below for examples.

    My point being: I doubt this is what your 'standard' app does; so even making it work is going to be a hassle.

    All a bit hard!

    Bottom line: If this is a GDI printer; get one that isn't!!

    If this is NOT a GDI printer; try a basic PCL-5 or PCL-6 'generic' printer driver; and then also check EVERY details of this printer setup in Windows compared to the others that work, specifically the print processor!

    Good luck.



    ------------------------------
    David Knight
    Senior Software Engineer
    H3O Business Technologies Limited
    ------------------------------