OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Hardware => Topic started by: Michael Snyder on March 02, 2018, 06:30:45 pm

Title: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 02, 2018, 06:30:45 pm
I just bought an HP OfficeJet Pro 8740 multifunction printer.  It supports Postscript 3 emulation, according to HP, and their Universal Postscript Driver does work in Windows 7.  Is it possible to extract a .ppd file from the Windows driver installer files that could be imported into the ArcaOS5 Postscript driver?  The printer works with the .ppd file from a Linux CUPS installation, but it doesn't offer the choices of which tray, which paper sizes, etc., that the Universal Postscript Driver does.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Andreas Kohl on March 02, 2018, 08:11:56 pm
Later versions of IBM's PostScript printer driver for OS/2 include some tools for importing the PPD file. There are also different versions from third parties derived from the DCDDK source code. So this procedure (http://www.edm2.com/index.php/PDDR/2_-_Importing_PostScript_Printer_Description_files) should still apply.

I hope this message will pass the censorship. So I should better not write about extracting resources or files from Windows self-extracting archives with native OS/2 tools. That's the time when the Linux kids start to piss on command.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Martin Iturbide on March 02, 2018, 08:55:17 pm
Andreas, if you read your message you will notice that your second paragraph is complete useless. Do you really want to help OS/2 users or you want to complain forever? If you want to be banned it is going to be your fault, not the one of the person that press the "ban button".

Regards
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 02, 2018, 09:12:03 pm
Hi Michael

The hplip supplied driver claims to fully support that printer from driver release 3.16.5 - see https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index

Not sure what level the current os/2 port of that driver is at... Looking at http://rpm.netlabs.org/release/00/i386/i686/ I see hplip-3.16.11-1.oc00.i686.rpm so looks like you should be able to get the ppd file from that package.


Regards

Pete
Title: Re: How to find or extract a Postscript printer driver?
Post by: roberto on March 02, 2018, 10:09:42 pm
In my opinion I would use this option to have *all the features of your printer* in a driver.
http://www.altsan.org/os2/printing/#psprint

The first thing is to extract the ppd from some linux version and convert it to the os2 format.
To do this you open the ppd file, write a space character, delete it, and save it.
From here you use the program PSPRINT.DRV version 30.905, see the readme.
Saludos

Title: Re: How to find or extract a Postscript printer driver?
Post by: ivan on March 02, 2018, 11:14:16 pm
I agree with Andreas regarding a PPD extracted from the windows driver package - they produce better output than the Linux ones, at least with my Brother colour laser network postscript printers. 

I have tried both the win and linux PPD in side by side blind tests and left it for friends to decide which they liked best.  In all 15 cases they preferred the win based output.  It could be because the Linux version is designed for use with cups  whereas the win one is for direct printing.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 03, 2018, 04:02:50 am
I have the windows postscript driver installed.  When I search for *.ppd in Windows, it shows me a location for hpcu210s.ppd in a subdirectory of \Windows\system32 , but when I look in that subdirectory, there is no .ppd file there.  My problem is how to copy it from wherever it is in Windows so that I can import it into an OS/2 postscript driver.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Dave Yeo on March 03, 2018, 06:35:30 am
xcopy \Windows\system32\hpcu210s.ppd x:\
Where x: is a fat32 formatted drive, perhaps a USB stick. Or adjust the destination.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Andreas Kohl on March 03, 2018, 01:10:50 pm
I have the windows postscript driver installed.  When I search for *.ppd in Windows, it shows me a location for hpcu210s.ppd in a subdirectory of \Windows\system32 , but when I look in that subdirectory, there is no .ppd file there.  My problem is how to copy it from wherever it is in Windows so that I can import it into an OS/2 postscript driver.
The corresponding PPD is packaged inside a Windows cabinet file (for example psi2enww.cab). You can simply use PKZIP /FIX on the installation SFX archive (downloaded) to create a Zip-Archive that could be extracted under OS/2 or similar systems. Now a cab extraction utility with LZX support can decompress the PPD text file. ISOLatin1 should work out of the box for US systems.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Andreas Kohl on March 04, 2018, 03:05:18 pm
Andreas, if you read your message you will notice that your second paragraph is complete useless.
It seems that your kinky expectations are cushioned against reality. Persecution mania?
Title: Re: How to find or extract a Postscript printer driver?
Post by: Ian Manners on March 04, 2018, 04:44:33 pm
Martin's reply is in relation to this post up the top, and as he states, the second paragraph.

Quote
Later versions of IBM's PostScript printer driver for OS/2 include some tools for importing the PPD file. There are also different versions from third parties derived from the DCDDK source code. So this procedure should still apply.

I hope this message will pass the censorship. So I should better not write about extracting resources or files from Windows self-extracting archives with native OS/2 tools. That's the time when the Linux kids start to piss on command.

You are free to say that but it's still pointless. Your first paragraph was spot on, you get a gold star :)

Title: Re: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 07, 2018, 09:58:12 pm
I managed to copy the HP universal postscript driver from Windows 7, but apparently I managed to break something.  I imported the .ppd file with instPDR.exe.  Every application that can print now crashes either when it loads, like OpenOffice, or shows an access violation when I try to print from it, like e.exe.  The .trp files show a shared memory access violation.

How do I completely remove the installed postscript driver so that I can then import the .ppds from my Lexmark e260dn and the OfficeJet Pro 8740 from Linux, which worked without crashing?
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 08, 2018, 12:54:30 am
Hi Michael

A case of delete the printer object that uses the driver, clean up the printer related ini file entries using prndrv - http://www.os2site.com/sw/comm/faxworks/prndrv.exe - then delete pscript/psprint.drv (whichever you used) and replace with a virgin copy.


Regards

Pete
Title: Re: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 08, 2018, 01:03:51 am
Is the driver that actually drives the printer
x:\os2\dll\pscript\pscript.drv
or
x:\sys\install\prndrv\pmdd_0\pscript.drv
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 08, 2018, 04:04:36 am
Hi Michael

The installed driver that you have added the ppd file to should be \os2\dll\pscript\pscript.drv - the pscript.drv within the \sys\install subdirectory should be the "virgin" driver.

Can I suggest that you try the psprint.drv version which you should find in \sys\install\PRNDRV\PMDD_6 - this is basically an updated version of pscript.drv with a few bug fixes and works better than pscript.drv for me (and probably more than a few other people). You may want to have a glance through the readme file before deciding which postscript driver to install.


Regards

Pete


Title: Re: How to find or extract a Postscript printer driver?
Post by: Doug Bissett on March 08, 2018, 04:17:10 am
Quote
I just bought an HP OfficeJet Pro 8740 multifunction printer.  It supports Postscript 3 emulation, according to HP, and their Universal Postscript Driver does work in Windows 7.  Is it possible to extract a .ppd file from the Windows driver installer files that could be imported into the ArcaOS5 Postscript driver?  The printer works with the .ppd file from a Linux CUPS installation, but it doesn't offer the choices of which tray, which paper sizes, etc., that the Universal Postscript Driver does.

Is there any GOOD reason why you aren't using CUPS? At least CUPS, installed by ArcaOS 5.0.2, includes that printer.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Andreas Kohl on March 08, 2018, 10:36:00 am
I managed to copy the HP universal postscript driver from Windows 7, but apparently I managed to break something.  I imported the .ppd file with instPDR.exe.
No, you simply used an experimental tool that looks fine at a first view but can be quite dangerous. The default behaviour of this tool can be compared with heart transplantations done with a manure fork. It's better to put the files for the PS printer driver to modify in a temporary directory and to use PIN.EXE.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 08, 2018, 04:05:32 pm
Hi Michael

In the \sys\install\PRNDRV\PMDD_6 directory are updated versions of the tools needed to convert a ppd file to make it suitable for use with psprint/pscript drivers. Follow the instructions in the readme carefully.

@Doug
The only good reason for using cups is that the printer needing support is not postscript capable. As Michael has a postscript capable printer cups is not really required.


Regards

Pete
Title: Re: How to find or extract a Postscript printer driver?
Post by: Doug Bissett on March 08, 2018, 07:55:56 pm
Quote
The only good reason for using cups is that the printer needing support is not postscript capable. As Michael has a postscript capable printer cups is not really required.

Perhaps not "required", if you don't mind messing around, for days, to try to make it work. About 2 minutes with the Install Cups Printer applet, and it is done properly.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 08, 2018, 09:03:23 pm
Hi Doug

It only takes a few minutes to perform the ppd conversion and cleanup and add the ppd file to psprint/pscript.drv

OTOH: Several *months* later I am still trying to get my "supported" printer working with the rpm version of cups - must admit that I have not had time to check out some recent "rpm-cups" package updates which may make a difference.


Regards

Pete
Title: Re: How to find or extract a Postscript printer driver?
Post by: Dariusz Piatkowski on March 09, 2018, 12:23:07 am
I see where one might want to try CUPS if the PPD driver import still fails to deliver a working printer configuration. In my case, I have a Brother HL5470DW, and even though that is a very capable PS printer and the driver import worked just fine, I still can TRAP the driver when attempting to use certain printer options.

Sooo....I have not tried CUPS, seems like way too much overhead to get a couple of extra features working, which really aren't all that critical in my case anyways. But...point is, yes, you may have to rely on something else even with a PS printer if the OS/2 driver simply can not handle it.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 09, 2018, 01:50:46 am
Hi Dariusz

If an imported  ppd file does not work with the psprint/pscript driver the chances are that installing cups will not help - you will still not have the OS/2 printer for applications to print to.


Regards

Pete
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 09, 2018, 01:59:03 am
Hi All

OTOH: Several *months* later I am still trying to get my "supported" printer working with the rpm version of cups - must admit that I have not had time to check out some recent "rpm-cups" package updates which may make a difference.


I made some time to check out recent cups related updates. After a little faffing around I now have a semi-working rpm-cups operated printer. The "semi-working" is that the OS/2 end of the print chain cannot switch between the A4 paper tray and Photo/Envelopes tray resulting in 4x6 photo output being printed on A4. Possibly a ppd file problem?

I guess we make progress...


Regards

Pete
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 11, 2018, 01:45:37 am
Hi Doug

Quote
The only good reason for using cups is that the printer needing support is not postscript capable. As Michael has a postscript capable printer cups is not really required.

Perhaps not "required", if you don't mind messing around, for days, to try to make it work. About 2 minutes with the Install Cups Printer applet, and it is done properly.


Hmmm... having discovered that the Install Cups Printer applet does a good job of creating the cups printer and then fails totally to create a working OS/2 printer I have to dispute your statement.

The reason that the app failed to create a working OS/2 printer is the required support did not already exist in psprint.drv so I had to select an existing driver, finish the Printer creation, manually add the required ppd file to psprint.drv and then set the created printer to use the correct driver.

However, I am using the version supplied with ArcaOS5.0.0 so it is possible it has been updated since then and is now more capable? - ie can do the intermediate steps of grabbing the required cups supplied ppd file performing the cleanup, conversion and adding to psprint.drv?


Regards

Pete




Title: Re: How to find or extract a Postscript printer driver?
Post by: Doug Bissett on March 11, 2018, 07:07:53 am
Quote
However, I am using the version supplied with ArcaOS5.0.0 so it is possible it has been updated since then and is now more capable?

Yes, there is a problem in 5.0, that is fixed in 5.0.2. It didn't affect every printer, but you may have one that has the problem. It is, apparently a timing thing, where it tries to use the PPD file, before it has been created.  The fix is supposed to be released to the world, but I don't see any announcement. It may be going through the conversion to be a RPM package, which always seems to take a lot longer than one would expect. I noticed an announcement recently, that the BJNP RPM package had been created (that is for Canon wireless printers). If you have the 5.0.2 ISO file, install \CID\SERVER\ARCAPKG\CUPSGUI.WPI and you should get the update.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 11, 2018, 07:25:37 am
Hi Doug

Yes, already using the bjnp package - created at my request, no less :-) see http://trac.netlabs.org/ports/ticket/155 with followup report http://trac.netlabs.org/ports/ticket/181

Glad to hear there has been a fix (or more) to the "Cups Wizard", will have to test when the update is released - No 5.0.2 at the moment but that may change in the near future.


Regards

Pete
Title: Re: How to find or extract a Postscript printer driver?
Post by: Alex Taylor on March 14, 2018, 03:51:27 pm
Quote
However, I am using the version supplied with ArcaOS5.0.0 so it is possible it has been updated since then and is now more capable?

Yes, there is a problem in 5.0, that is fixed in 5.0.2. It didn't affect every printer, but you may have one that has the problem. It is, apparently a timing thing, where it tries to use the PPD file, before it has been created.  The fix is supposed to be released to the world, but I don't see any announcement. It may be going through the conversion to be a RPM package, which always seems to take a lot longer than one would expect. I noticed an announcement recently, that the BJNP RPM package had been created (that is for Canon wireless printers). If you have the 5.0.2 ISO file, install \CID\SERVER\ARCAPKG\CUPSGUI.WPI and you should get the update.

The current versions of PRINTMAN and CUPSWIZ are both available from: http://www.altsan.org/os2/printing/index.html

Title: Re: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 15, 2018, 02:23:53 pm
Is there a command to reinstall the just printer drivers from the installation CD?  I've tried updating the printer drivers with instpdr from the latest psprint zip file and copying files from \sys\install\prrndrv, and now I can't import any .ppd file at all.  I'd rather not reinstall the whole system, so is there a way to just install the printer drivers in the right places from the install CD?
Title: Re: How to find or extract a Postscript printer driver?
Post by: Alex Taylor on March 15, 2018, 03:40:00 pm
Is there a command to reinstall the just printer drivers from the installation CD?  I've tried updating the printer drivers with instpdr from the latest psprint zip file and copying files from \sys\install\prrndrv, and now I can't import any .ppd file at all.  I'd rather not reinstall the whole system, so is there a way to just install the printer drivers in the right places from the install CD?

First,

Assuming you have ArcaOS, just use the Printer Manager to delete ALL printers and drivers.  (Alternatively, use prndrv.exe with the -d switch from a command line, if you have it.)

Then start installing printers again, using the Printer Manager (PrintMan). 


Second,

Use the PSPRINT driver, not PSCRIPT.

ArcaOS 5.0 already includes the latest (30.906) version of PSPRINT, so do not try to install the version from my website, which is actually older.  (I really should update that, but since others did much of the work on 906 I need to get an OK from the appropriate people first.)  30.906 (in particular, PIN.EXE) has some critical fixes for importing PPDs that will cause older versions to crash.  (These are not guaranteed to fix every instance of this, but your odds are much better.)


Third,

Do not use the ancient and unsupported InstPDR tool.  (Where did you even find it? I'm pretty sure I removed it from my website years ago.)  This tool has been obsoleted and replaced by PrintMan.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 17, 2018, 11:50:50 pm
I've had instpdr since you either sent it to me or recommended it to me years ago when I needed to add a .ppd for my Lexmark e260dn.  But I understand that it won't work now.  I'll use Print Manager in the future.

Not knowing that the installed version from ArcaOS5 was newer, I think that I've overwritten it with the one from your web site in the several locations that it's in.  Is it possible to just install the printer drivers from the CD?  I've deleted and reinstalled printers with both prndrv and with Print Manager and can't seem to get a working printer.

Is it possible to update the installed version of hplip?  That has a driver for the OfficeJet Pro 8740 that works pretty well in Linux.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Alex Taylor on March 18, 2018, 02:51:38 am
Not knowing that the installed version from ArcaOS5 was newer, I think that I've overwritten it with the one from your web site in the several locations that it's in.  Is it possible to just install the printer drivers from the CD?  I've deleted and reinstalled printers with both prndrv and with Print Manager and can't seem to get a working printer.

OK, first let's make sure you're back at PSPRINT version 30.906. 

Once done, you can delete the temporary directory you unzipped PSPRINT.ZIP into.

Quote
Is it possible to update the installed version of hplip?  That has a driver for the OfficeJet Pro 8740 that works pretty well in Linux.

I'm not sure what the latest OS/2 build is, but you can probably find it via yum or ANPM...

(OTOH, manually updating HPLIP is not something I'd recommend unless you're very familiar with CUPS.)
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 18, 2018, 03:03:12 am
Hi Michael

You should find psprint bits here [dvd]:\CID\SERVER\PRINTPAK\PSPRINT.ZIP

I suggest you try the following
1] Delete any existing printer objects and queues
2] Open a command line in [BootDrive]:\sys\install\PRNDRV\PMDD_6 and use DEL * to clear the directory - you will have problems trying to delete a .DRV file using the Desktop
3] Open a command line in [BootDrive]:\OS2\DLL\psprint\psprint.drv and use DEL * to clear the directory
4] Unzip [dvd]:\CID\SERVER\PRINTPAK\PSPRINT.ZIP into the [BootDrive]:\sys\install\PRNDRV\PMDD_6 directory
5] Use Computer -> Printers -> Install Printer to create a new printer

The Arca Noae Package Manager should show any hplip updates - you may want to install the netlabs-exp repository as that shows v3.17.11-1 available but be aware that the "exp" probably means experimental.


Regards

Pete
Title: Re: How to find or extract a Postscript printer driver?
Post by: Dave Yeo on March 18, 2018, 03:38:58 am
The Arca Noae Package Manager should show any hplip updates - you may want to install the netlabs-exp repository as that shows v3.17.11-1 available but be aware that the "exp" probably means experimental.

It does. Be careful installing stuff from exp, you can break your system. In this case just install v3.17.11-1 and any dependencies it needs, if any.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 19, 2018, 03:24:48 pm
I've followed the above instructions.  I can create CUPS printers for both my Lexmark e260dn and my HP OfficeJet Pro 8740 from the web interface that print the test pages.  But I cannot create an OS/2 printer object for either of them using Print Manager or the Create Printer object.  The failure happens after I press the Create button at the end of the process.

I read on the Arca Noae web site that we're about to get some new printing system that works better with both postscript and CUPS printers.  Is that likely to make it possible for me to print with my printers again?
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 19, 2018, 07:43:45 pm
Hi Michael

Are any previous printers/queues using the same name(s) totally deleted? - use prndrv.exe to check for and delete any that remain  http://www.os2site.com/sw/comm/faxworks/prndrv.exe

I have sometimes found it necessary to reboot after deleting printers/queues.

It may be an idea to post all the steps taken in your attempt to create a printer - maybe someone will spot a missing/wrong step...


Regards

Pete
Title: Re: How to find or extract a Postscript printer driver?
Post by: roberto on March 19, 2018, 08:39:11 pm
Hi Michael

You should find psprint bits here [dvd]:\CID\SERVER\PRINTPAK\PSPRINT.ZIP

I suggest you try the following
1] Delete any existing printer objects and queues
2] Open a command line in [BootDrive]:\sys\install\PRNDRV\PMDD_6 and use DEL * to clear the directory - you will have problems trying to delete a .DRV file using the Desktop
Just call attention to delete this folder ?:\Os2\dll\psprint have two options
a) Start with alt + F1 when the OS / 2 icon appears in your left window and then F2
b) Boot the system from the DVD and use the system maintenance and open a comamdcom
Quote
3] Open a command line in [BootDrive]:\OS2\DLL\psprint\psprint.drv and use DEL * to clear the directory
4] Unzip [dvd]:\CID\SERVER\PRINTPAK\PSPRINT.ZIP into the [BootDrive]:\sys\install\PRNDRV\PMDD_6 directory
5] Use Computer -> Printers -> Install Printer to create a new printer

The Arca Noae Package Manager should show any hplip updates - you may want to install the netlabs-exp repository as that shows v3.17.11-1 available but be aware that the "exp" probably means experimental.


Regards

Pete
Title: Re: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 20, 2018, 03:12:22 am
Pete,

I've deleted the printers and print queues with both prndrv and with PM Printer Manager 0.61.  They both get rid of them.  Then I've used Printer Manager to create a printer.  Select Printers tab, Select Create a CUPS printer.  Select HP.  Select OfficeJet Pro 8740.  Selected the detected printer on 192.168.101.96, its correct address.  Fill out the Printer Object name screen.  On the Create screen, psprint is selected as the driver and the rest of the information is as I put in on the previous screen.  Click Create.  Error says see g:\var\log\cupswizl1.  Log follows:

--[ 19 March 2018 21:59:23 ]---------------------------------------------------
Starting printer install with user-provided PPD:
 - PPD file:    I:\DRIVERS\PRINTERS\OfficeJet_Pro_8740\hp-officejet_pro_8740-ps.ppd
 - Model name:  HP OfficeJet Pro 8740

Driver ECUPS is not in the local repository.
Driver ECUPS-HP is not in the local repository.
No local printer, creating remote CUPS printer
Creating CUPS printer using:
    lpadmin -p OJP_8740_Ltr -E -D "HP OfficeJet Pro 8740" -L "dad's office" -v "socket://192.168.101.96:9100" -P "I:\DRIVERS\PRINTERS\OfficeJet_Pro_8740\hp-officejet_pro_8740-ps.ppd" -o media=Letter
Return code: 0x0000

Creating OS/2 printer object:
Mode:   2
Driver: PSPRINT
Model:  HP OfficeJet Pro 8740
Importing user-supplied PPD I:\DRIVERS\PRINTERS\OfficeJet_Pro_8740\hp-officejet_pro_8740-ps.ppd
Going to import PPD file into driver PSPRINT.
Converting PPD with: J:\var\temp\PPD_7377\PPDENC.EXE I:\DRIVERS\PRINTERS\OFFICEJET_PRO_8740\HP-OFFICEJET_PRO_8740-PS.PPD G:\SYS\INSTALL\PRNDRV\PPD_PS\HP-OFFICEJET_PRO_8740-PS.PPD
Doing cleanup on G:\SYS\INSTALL\PRNDRV\PPD_PS\HP-OFFICEJET_PRO_8740-PS.PPD ...OK

Updating G:\OS2\install\prdesc.lst with 12 new entries ...
No drivers found in PSPRINT (missing .EXPAND extended attribute?)
Copying files from J:\var\temp\PPD_7377\OUT to G:\SYS\INSTALL\PRNDRV\PMDD_6
12 printers imported successfully.
 -> Lexmark E260dn
 -> HP OfficeJet Pro 8740
 -> HP OfficeJet Pro 8740
 -> HP Universal Printing PS
 -> HP Officejet Pro 6230
 -> HP Officejet Pro 6230 hpijs
 -> HP Officejet Pro 6230
 -> HP Officejet Pro 6230
 -> HP Officejet Pro 8720
 -> HP Officejet Pro 6230
 -> HP Officejet Pro 6230
 -> HP Officejet Pro 6230

Creating new port CUPS3
InstallPrintDriver( PSPRINT, G:\SYS\INSTALL\PRNDRV\PMDD_6\PSPRINT.DRV, HP OfficeJet Pro 8740 ) RC = 0
Creating new printer: HP OfficeJet Pro 8740 (HPOFFICE)
CreatePrinterObject( PSPRINT, HP OfficeJet Pro 8740, CUPS3, HPOFFICE, HP OfficeJet Pro 8740 ) RC = 0

However, when I attempt to print two lines of text from e.exe to the created printer, both lines are printed on the same line of the paper.

Title: Re: How to find or extract a Postscript printer driver?
Post by: roberto on March 20, 2018, 08:11:37 am
However, when I attempt to print two lines of text from e.exe to the created printer, both lines are printed on the same line of the paper.
The e.exe fail to print. Use other editor epm.exe
saludos
Title: Re: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 20, 2018, 01:22:23 pm
Thanks to all who provided advice.  I finally succeeded in creating two CUPS printers that print.  The Lexmark .ppd file that previously imported correctly and worked would not import into pscript or psprint.  The postscript driver from Linux for the OJP 8740 would import but not print properly.  When I decided to use CUPS, the Lexmark .ppd imports and prints.  I had to select a less-capable HP printer to get one that was similar and works in CUPS, but they at least print.

The reason for wanting a postscript driver that worked is that it allows one to select any of the features, such as multiple trays, that a printer has.  My experience with CUPS is that unless you create printers with defaults for each form size that you print, you will get a forms mismatch and failure to print when you want to print an envelope, for example.  If I'm doing this wrong, please explain how to do it correctly.

Thanks again for the help.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 20, 2018, 02:44:13 pm
Hi All

The reason for wanting a postscript driver that worked is that it allows one to select any of the features, such as multiple trays, that a printer has.  My experience with CUPS is that unless you create printers with defaults for each form size that you print, you will get a forms mismatch and failure to print when you want to print an envelope, for example.  If I'm doing this wrong, please explain how to do it correctly.


I have to say that the above is my current experience with cups for os/2.

Creating several printers in order to use different size paper from different trays indicates that cups has problem(s) that need resolving but whether the problem(s) is(are) within the ppd file(s) used or cups itself or the os/2 printer creation I do not know.


Regards

Pete


Title: Re: How to find or extract a Postscript printer driver?
Post by: ivan on March 20, 2018, 04:15:17 pm
Pete, you are one up on me.  I have never got a networked printer to print with cups on OS/2.  While at work we used postscript printers that were included with the pscript driver for both our own use and that of clients.

That being said I must also say that importing a ppd into either the pscript or psprint driver has always worked - provided that the ppd has been cleaned (prepared for os/2 use).

Now I have to work out how to scan from my Brother DCP-9020cdw all in one using something like Tame, again over a network.


Michael, I find it strange that you couldn't import the ppd files and am wondering if you missed something in the cleaning stage.

Could you post both ppd files for me to have a look at?  Since I retired and learned about importing ppd files into both pscript and psprint drivers I have updated my old clients printers without any problems after I learned that it was essential to prepare the ppds first.  The new printers are both local and networked.

Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 20, 2018, 06:14:27 pm
Hi Michael

However, when I attempt to print two lines of text from e.exe to the created printer, both lines are printed on the same line of the paper.


I seem to recall something about this in the ecups newsgroup but cannot find it on a quick search.

It is possible that the CUPS printer port software is not "in sync" with the installed cups software which is easily checked.

Is \TCPIP\bin\cupslpr.exe exactly the same size and date:time as \usr\bin\lpr.exe ?
If "No" then follow these steps:-
  1] Copy \TCPIP\bin\cupslpr.exe \TCPIP\bin\cupslpr.exe.OLD
  2] Delete \TCPIP\bin\cupslpr.exe
  3] Copy \usr\bin\lpr.exe  \TCPIP\bin\cupslpr.exe

It is also possible that something is not up to date in supporting software so suggest you run ANPM and check for any updates that may be applicable.

Did you get the hp-officejet_pro_8740-ps.ppd file from a hplip package?


Regards

Pete


Title: Re: How to find or extract a Postscript printer driver?
Post by: Alex Taylor on March 20, 2018, 08:51:56 pm
However, when I attempt to print two lines of text from e.exe to the created printer, both lines are printed on the same line of the paper.

Arg.  I know I remember this, and I know I spent a long time trying in vain to solve it... I just can't remember when it was, or find my notes on it, just now.

From what I remember, that only occurs when doing a direct ASCII print (such as from the old E editor) when the printer object has a TrueType font set as the default text font.

Go the the "Text Format" page of the printer object properties, and change the font to a Type 1 font like "Courier". 

My best guess is that the vertical font metrics are somehow being lost when rendering ASCII with a TrueType font, but I never figured out where or how that was happening.  (It doesn't happen if the font is rasterized, but of course then you lose the advantages of font downloading.)
Title: Re: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 21, 2018, 03:42:45 am
Ivan,

The lexmark .ppd file imported fine into psprint before I started this recent adventure.  I'll post three files.  One is the .ppd for the e260dn, the second one is the HP OJP 8740 .ppd that I copied from a CUPS installation on Linux, and the third is the one that I copied from an installation of the HP OfficeJet Pro 8740 on Windows 7.  It's what HP calls their universal postscript driver.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 21, 2018, 03:54:49 am
Pete,

lpr.exe is 18 months newer and 12 bytes larger than cupslpr.exe.  However, I can print from CUPS.  It's pscript and psprint that I can't get to import the .ppds or print.

Yes, that .ppd is from Linux after I installed the latest hplip.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 21, 2018, 04:28:17 am
Hi Michael

The cupslpr.exe needs to be replaced by copying the lpr.exe as mentioned previously. It will not help with importing ppds but it may help with the output from e.exe as the output from the OS/2 printer is sent through cupslpr.exe to the cups printer.

I must admit immediately that I am not any sort of ppd expert. However, I do see a problem with the hp-officejet_pro_8740-ps.ppd file - the Language Encoding is incorrect, should be OS2-850.

I suspect you may have gone about creating a printer slightly wrong. I think you used the cups browser interface to create a cups printer and then tried using the Install Printer app and gave it the ppd file.

You should have used the Install Printer for the whole process as it will
1] create the cups printer
2] pickup a copy of the ppd file
3] clean and encode the ppd file
4] add the ppd file to the psprint.drv
5] create the os/2 printer using the just created driver.

It may be worth starting over and seeing if you get better results.

Added shortly after posting: Earlier in this discussion Alex stated that updated versions of the Install Printer/Print Manager are available here http://www.altsan.org/os2/printing/index.html


Regards

Pete


Title: Re: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 21, 2018, 12:01:51 pm
I've installed the updated version of the printer manager from Alex's site.  It didn't help with importing .ppds.

I've tried everything that I could think of, including creating a printer first in CUPS.  Those printers printed the test page properly, but I couldn't figure out how to create an OS/2 printer object for them, so I deleted them.  The current printers were created entirely using Print Manager.

The .ppd that I posted had not been run through clean.exe.  It is just as I copied it from Linux.  I did clean one, but I couldn't get it to print after I had imported it, or couldn't import it, I don't remember which.
Title: Re: How to find or extract a Postscript printer driver?
Post by: roberto on March 21, 2018, 06:23:45 pm
Of the three files to make the cupstestppd only in the Lexmark passes the test. The other two fail.
Can you tell the models and if they are of injection or laser?
saludos
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 21, 2018, 09:50:18 pm
Hi Michael

Here is how I would go about setting up a printer manually.
NOTE: This presumes no cups or os/2 printers and no printer queues exist.

In the following I use "thecupsprinter" as a placeholder for whatever printer is created in cups, change that for the printer name in use


1] The CUPS printer

i] With cupsd.exe running point your browser to localhost:631 to load the cups interface
ii] Click on Administration and create a cups printer - if creating a HP printer hplip needs to be installed
iii] Print the test page
If the above worked fine - and it seems you have got to this point successfully a few times - minimise or close the browser


2] Adding the *cups/hplip supplied* ppd file to a clean copy of psprint.drv

i] You need a clean previously unused copy of all the psprint files in a temp location eg Temp\psprint
ii] Create a subdirectory Temp\psprint\ppd
iii] Copy \etc\cups\ppd\thecupsprinter.ppd to Temp\psprint\ppd
iv] Open a command line window in Temp\psprint and run these commands
   a] cleanppd Temp\psprint\ppd\thecupsprinter.ppd
   b] ppdenc Temp\psprint\ppd\thecupsprinter.ppd
The ppd file is now ready for adding to psprint.drv using pin.exe
v] Run
   pin ppd Temp\psprint\ppd Temp\psprint\psprint.drv
vi] Copy all files in Temp\psprint to \os2\dll\psprint after deleting any files that already exist in \os2\dll\psprint
NOTE:
   a] if you need to delete an existing \os2\dll\psprint\psprint.drv use the command line
   b] you will need to use the command line to copy Temp\psprint\psprint.drv


3] The OS/2 printer object

As the Print Manager/CupsWizard route does not seem to work for you try this
i] Open the Desktop\Computer\Templates folder
ii] Drag a Printer template to the Desktop\Computer\Printers folder
iii] Click OK to Create a Printer object and the older Printer Install dialog opens
   a] Name the printer
   b] Install and Select the psprint printer you added in the steps above
   c] Select the cups port - install if necessary - and fill in details
      CUPS Server : localhost
      CUPS Printer Name : thecupsprinter
   d] Click Create

Hopefully you now have a printer object that *should* work with os/2 apps - Sorry, no guarantees  :-)

Try and print from Text Editor. If that works try other apps.

If the print job gets stuck in the os/2 spooler you need to check cupslpr.exe as mentioned previously in this discussion

You may find that the printer can only print to A4/Letter and no other paper tray can be selected - my experience with my current Canon printer


I hope the above helps

Pete
Title: Re: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 21, 2018, 10:32:12 pm
Pete,

Thanks for the detailed instructions.

The Printer Manager did actually work to create CUPS printers for me.  It's the postscript printers that I could not create.  I guess that I'll live with CUPS for a while.

Thanks again for all of your help.

Mike
Title: Re: How to find or extract a Postscript printer driver?
Post by: Alex Taylor on March 22, 2018, 05:02:01 am
It's a sad fact that some PPDs just cannot be made to work with (any of the) OS/2 Postscript drivers.  The underlying driver engine (whether PSCRIPT, PSPRINT, or whatever) is quite old, and was written in an era when your typical PPD file was a few KB in size with a fairly basic set of commands.  (PIN itself is also a pretty dumb and not very well-written program.)  It's possible that this PPD you're trying to import is simply too large, to complex, or too unorthodox to be importable.  (Without being able to examine it, I can't say for sure.)

OTOH, the Generic Postscript (Enhanced) driver built in to PSPRINT usually works quite well. It supports colour, duplex, high resolutions, and a good set of standard paper sizes.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Andi B. on March 22, 2018, 09:08:18 am
Quote
OTOH, the Generic Postscript (Enhanced) driver built in to PSPRINT usually works quite well. It supports colour, duplex, high resolutions, and a good set of standard paper sizes.
IIRC this driver does not allow less than 12.x mm margin form paper boarders. This was the reason why I started playing with importing ppd files some time ago. Is this quite true? Or do I mix things up here?
Title: Re: How to find or extract a Postscript printer driver?
Post by: Alex Taylor on March 22, 2018, 09:11:20 pm
Quote
OTOH, the Generic Postscript (Enhanced) driver built in to PSPRINT usually works quite well. It supports colour, duplex, high resolutions, and a good set of standard paper sizes.
IIRC this driver does not allow less than 12.x mm margin form paper boarders. This was the reason why I started playing with importing ppd files some time ago. Is this quite true? Or do I mix things up here?

That may well be true, but it's a pretty specialized requirement for non-photo printers (most of which aren't Postscript anyway) and I'm Michael hasn't mentioned needing such a thing.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 23, 2018, 12:31:57 am
I often use margins of less than 1 inch, and on 3x5 or 4x6 cards like to make them as small as possible.  One of the reasons that I got the 8740 is that it prints a wide range of paper sizes, and to print 4x6 recipe cards in type large enough for old people like me to read, you need to use small margins.
Title: Re: How to find or extract a Postscript printer driver?
Post by: Michael Snyder on March 23, 2018, 02:51:57 am
Just for fun, I tried printing on a 4x6 card using the enhanced generic postscript driver.  If you tell it that you are printing on a #10 envelope and set the margins correctly, it will print a 4x6 card with margins of about 1/4 inch, or 6 mm.  Neither OpenOffice nor the driver seems to have 4x6 cards as a form choice.  Yes, I know that the rest of the world doesn't use that size. :-)
Title: Re: How to find or extract a Postscript printer driver?
Post by: Andi B. on March 25, 2018, 12:39:24 pm
Quote
OTOH, the Generic Postscript (Enhanced) driver built in to PSPRINT usually works quite well. It supports colour, duplex, high resolutions, and a good set of standard paper sizes.
IIRC this driver does not allow less than 12.x mm margin form paper boarders. This was the reason why I started playing with importing ppd files some time ago. Is this quite true? Or do I mix things up here?

That may well be true, but it's a pretty specialized requirement for non-photo printers (most of which aren't Postscript anyway) and I'm Michael hasn't mentioned needing such a thing.
It's very common for printers to have minimum margins of 4-6mm. At least that's true for all the postscript printers I used the last two decades. And I need that very much.

You are right this is a bit OT in this thread. But as it has gotten your attention and this is a forum not the bug tracker ;-) I hope you can fix this for future releases. Thx.
Title: Re: How to find or extract a Postscript printer driver?
Post by: roberto on March 25, 2018, 11:04:12 pm
I had a very curious case, installing a printer. I comment on it if it can help someone.
I just installed arca502 from the beginning.
And I decided to create a new printer, a printer that worked in the past with psprint and whose ppd is correct.
I do not install it in cups.
I select this program
C:\SYS\APPS\CUPSGUI\CUPSWIZ.EXE  (install cups printer)
In the installation I select the ppd that is correct, and I believe it.
I try it and it does not work, it can be the port ...
Change the output port and it still does not work.

Click twice on this file:
C:\OS2\DLL\PSPRINT\PSPRINT.DRV
I select the printer and drag it to the desktop, I put the port in it and it works.

The conclusion that I get, is that you do not need to install the printer in cups to make it work.

What strikes me is that the two printers use the same driver, and with the same port, one does not work and the other does.
Saludos
Title: Re: How to find or extract a Postscript printer driver?
Post by: Pete on March 26, 2018, 06:53:26 pm
Hi roberto

If you are using a postcript printer you do not need to install it in cups.

If you are using a raster printer (most inkjets) you *do* need to install it in cups as cups is the software that does the conversion between postscript and raster enabling the postscript output from applications to print on raster printers.

You used cupswiz which starts with creating the cups printer, imports the ppd file used with the cups printer into the pscript.drv and finally sets up the OS/2 printer object.


Regards

Pete
Title: Re: How to find or extract a Postscript printer driver?
Post by: roberto on March 26, 2018, 08:33:55 pm
Hi Pete
If you are using a postcript printer you do not need to install it in cups.
You are right, it should be like that.
But following your comments, I created another printer with the same ppd, but from this other program:
C:\SYS\APPS\PRINTMAN\PRINTMAN.EXE/create   (Install Printer)
The printer is created, it even indicates a port already configured LPD, but it does not print anything.
I change the port and it does not print anything.
Quote
If you are using a raster printer (most inkjets) you *do* need to install it in cups as cups is the software that does the conversion between postscript and raster enabling the postscript output from applications to print on raster printers.
ok 100%
Quote
You used cupswiz which starts with creating the cups printer, imports the ppd file used with the cups printer into the pscript.drv and finally sets up the OS/2 printer object.
Yes, But my system works, is there another system to do it?
In the past, the other way was to create your own printer with psprint30905.zip

Saludos