Author Topic: Problems Installing a PPD for PM  (Read 355 times)

Doug Clark

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 97
    • View Profile
Problems Installing a PPD for PM
« on: November 07, 2018, 10:42:50 pm »
I am attempting to install a PPD using PIN.EXE and get the error message

reading driver extended attributes
   fail
SYS005: Access is denied
fail

Background
-----------------
I have an HP m452dn printer. The m452 family of printers includes m452dn, m452dw (with duplexer) and m452nw (no duplexer).

hplib, which apparently is where CUPS gets (some of) its *.PPD files from has
hp-color_laserjet_452-ps.ppd   and
hp-color_laserjet_452d-ps.ppd

The "d" in the name indicates the PPD for the printers which have a duplexer. Unfortunately the nickname in both those PPD files is the same, so CUPS can't distinguish between the two files.

I found the correct *.ppd for the HP m452 models with a duplexer, changed the nickname and used CUPS to modify the printer I had already installed to the new PPD. (That file is attached as hp_m452d_ppd.zip) Everything works great.

Problem
-------------
Now I want to update the PM printer driver with the new, correct PPD that contains duplexer info.  When running PIN to import the PPD I get an access is denied error - a screen shot of the error message is attached. I also get an error when trying to import the same PPD with the Manager Printers object in the Printers folder.

I get the message running PIN on the PPD before it has been cleaned, and after the PPD has been cleaned with cleanPPD.exe.  I have attached the cleaned PPD

Pete

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 28
  • Posts: 679
    • View Profile
Re: Problems Installing a PPD for PM
« Reply #1 on: November 08, 2018, 05:23:24 am »
Hi Doug

Have you tried installing the cleaned ppd file to a "virgin" copy of psprint.drv?


Regards

Pete

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 28
  • Posts: 267
    • View Profile
Re: Problems Installing a PPD for PM
« Reply #2 on: November 08, 2018, 01:08:48 pm »
The printer driver (the .DRV file) is nothing more than a DLL and it is likely loaded by the OS.
Try to run "unlock.exe" against the directory the .DRV file is located in (I think somewhere in \OS2\DLL\DRIVERS or so). There are other files apart from the .DRV file which might need to be unlocked this way.

I also seem to remember that if you import a custom .PPD file that a file "auxprint.pak" is generated in the directory where the .DRV file is located in. Try to delete that before you attempt to reimport your custom .PPD file.

roberto

  • Sr. Member
  • ****
  • Thank You
  • -Given: 16
  • -Receive: 7
  • Posts: 415
    • View Profile
Re: Problems Installing a PPD for PM
« Reply #3 on: November 08, 2018, 08:26:08 pm »
If you have two drivers with the same name, you can modify the
* ShortNickName: "HP Color LaserJet Pro M452 my especial printer", on the other, it will be what you see with the name of the driver.
You have to erase all the printers * psprint *, that you have installed.
Verify in the trash that they are really deleted, especially with old versions of the OS. In ARCAOS it is not necessary, it is finally erased.
Rename the folder os2 \ dll \ psprint by psprint-stop or similar. I'm not sure if you have to restart here.
Create a new driver with all the printers or ppd files that you want to include in the new driver. That's why the readme advises you to use different folders to have all ppd files together. As Pete tells you, with a virgin file psprint*no remember de name.zip.
When you install the new printers, a new psprint folder will be created, if all is well you delete the folder renamed to psprint-stop.
saludos

Doug Clark

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 97
    • View Profile
Re: Problems Installing a PPD for PM
« Reply #4 on: November 09, 2018, 02:11:22 am »
Thanks roberto and Lars for your help,

I almost had it all running correctly and then reinstalled a cups driver and everything went back to the start - and now I can't get to where I was before.

Part of my problem was Lucide was not honoring the "print on a single side" / "print on 2 sides" setting in the driver; it always prints on both side no matter what the setting. I thought for a number of hours that it was a printer driver issue but it appears to be a Lucide issue.

There was a period of time when it was printing via CUPS, via lpd from OS/2 and from WinOS2 as postscript, and printing from OS/2 as PCL. But then I did something that took me back to the beginning.

The sad part is the import *.ppd in WinOS2 works great. But the Manage Printer object in ArcaOS has a bug.

[changed Printer Manager to Manage Printer]
« Last Edit: November 10, 2018, 05:26:12 pm by Doug Clark »

roberto

  • Sr. Member
  • ****
  • Thank You
  • -Given: 16
  • -Receive: 7
  • Posts: 415
    • View Profile
Re: Problems Installing a PPD for PM
« Reply #5 on: November 09, 2018, 10:43:00 am »
Part of my problem was Lucide was not honoring the "print on a single side" / "print on 2 sides" setting in the driver; it always prints on both side no matter what the setting. I thought for a number of hours that it was a printer driver issue but it appears to be a Lucide issue.
I have the same problem with lucide, with a Lexmark cs410dn printer, with the legacy C750 driver. But the one that prints you on two faces only happens if you select in Lucide to print double-sided and you have selected as poscrit, if you select as an image in the lucide it only prints one side.
saludos

Doug Clark

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 97
    • View Profile
Re: Problems Installing a PPD for PM
« Reply #6 on: November 11, 2018, 02:09:51 am »
Thanks Roberto, Lars, and Pete for your help.

My problem (or one of my problems) was I didn't understand that PIN.EXE needs an existing printer driver in order to process the PPD file. And as Lars pointed out, you can't run it in the directory (and probably shouldn't anyway) where it is installed because it will be locked if any application has loaded it.

What I eventually figured out is you have to point PIN to an already existing printer driver file (psprint.drv) or it will fail. The steps that worked for me

copy c:\os2\dll\psprint\psprint.*  f:\temp\driver
copy my.ppd f:\temp\ppd
pin ppd f:\temp\ppd  f:\temp\driver\psprint.drv
use Manage Printers to Add.Update PSPRINT.DRV

The ideal solution is to use the Manage Printers object to directly install the PPD. Unfortunately on my machine (ArcaOS) the Install PPD option of Manage Printers fails with an error, which is why I was using PIN.EXE. (I will note Install PPD  works in eCS 2.2)

But with CUPS installed the other option is to simply install a CUPS printer for the PPD using the -Custom- -- Other Printer (requires PPD) -- option. That automatically imports the PPD to PSPRINT.DRV and creates a printer object in the Printers folder with its output port pointing to CUPS. Very nice, very slick. (I wish I was smart enough to have thought about that a couple of days ago.) Then I can install another printer using the newly imported PPD that has been created in PSPRINT.DRV

As Pete pointed out earlier you don't need CUPS if you are using a postscript printer. But having CUPS (once I figured it out) makes installing a new PPD very easy. Plus qpdfview (tabbed PDF viewer) prints directly to CUPS so you need CUPS to print from that application. I image there are other Qt based apps that will only print directly to CUPS, so you will need CUPS for those even with a postscript printer.

The one problem I have is specifying single side or duplex on an individual print job when printing to CUPS through a PM printer object doesn't work. The printer uses the duplex setting from CUPS regardless of what you specify on the print job - when printing through a PM print object. qpdfview, whichs prints directly to CUPS, does handle the duplex setting correctly. Which is one reason why you need a print object that outputs through lpr or appsocket in addition to the CUPS printer object.