OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Hardware => Topic started by: Dariusz Piatkowski on December 04, 2015, 05:17:04 am

Title: Anyone successfully using Brother HL-5470dw?
Post by: Dariusz Piatkowski on December 04, 2015, 05:17:04 am
I've got my good 'ol trusty Brother HL-1650 (with NIC card, so really the same config as HL-1670) Postscript printer here, working very well with my OS/2 setup. Both the standard IBM as well as Alex's PSPRINT drivers support all the feature. However...the printer is aged and while I love it, the reality is that it's starting to show it's age.

With some of the sales around these past couple of weeks I spied the HL-5470dw unit...as the Brother (http://www.brother-usa.com/Printer/ModelDetail/1/HL5470DW/Overview (http://www.brother-usa.com/Printer/ModelDetail/1/HL5470DW/Overview)) product page shows this is basically a modern day (updated) version of the HL-1670...still a Postscript printer, duplexed, fast not to mention it support Wi-Fi and the various types of Cloud/Google/Air printing (great for kids to run stuff off of their tablets).

So here is the big question: has anyone tried this unit in OS/2?
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on December 05, 2015, 09:31:16 am
If the printer supports PostScript 3, you can search the file printer drivers either Windows or Linux. Looking for the xxxxxxx.PPD file. With this file you move to your OS2, and the utility to import driver Alex, you can have a proper driver for your printer the OS2. That will allow you to use all the features of your printer.
This is true for any manufacturer, HP, Xerox, etc. not only for Brother.
I have come to hate cups, although work.
If you need assistance in the import, question.
Saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Paul Smedley on December 05, 2015, 10:57:57 am
I have come to hate cups, although work.

Care to elaborate more on this?
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: ak120 on December 05, 2015, 03:53:42 pm
CUPS is great for networks with UNIX, but overdosed and oversized for small OS/2 based LAN systems. There's almost no existing documentation for OS/2 port (sometimes called eCups). If you have some idea of a real-life version of cups for OS/2 including useful OS/2 amd DOS/Win-OS/2 application support, working lpr or line printers on local parallel and serial ports.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on December 05, 2015, 06:24:18 pm

Care to elaborate more on this?
First of all, thank you very much for your great work.
I can not say that cups in the future will not be necessary. But as a user, if I can choose to use cups, or using its own driver OS2, I prefer to use the OS2 driver.
Formerly a laser color printer with PostScript 3, cost 3000 euros, now less than 300 euros.
I have used in my cups work with inkjet, since the beginning of cups, and provided only 3 teams, I have come to hate. For hours I had to spend to make it work. And calls from users complaining that not print me. Usually the problem was not cups, was the user and the peculiarities of cups.
saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Joseph M. Kempf on December 06, 2015, 02:30:27 am
I would expect Brother's Postscript drive to work, if it is properly imported into OS/2-eCS by way of instprn.  I was able to so use Brother's  Windows version of its postscript drivers (*.PPD) to print in eCS on Brother's HL-3070CND, HL-4070CDW and MFC-L8850CDW.  Note that I had to clean and import it into eCS with instprn.  I could not get the CUPS Linux version of the Brother's PPD to work however.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Neil Waldhauer on December 06, 2015, 02:55:29 am
Since Alex Taylor's manage printers is available, running eCups is no problem for me. However, the OP printer, Brother HL-5470dw is not currently listed.

Is my cups installation out of date?

Neil
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Paul Smedley on December 06, 2015, 03:11:16 am
Hi Andreas,

CUPS is great for networks with UNIX, but overdosed and oversized for small OS/2 based LAN systems. There's almost no existing documentation for OS/2 port (sometimes called eCups). If you have some idea of a real-life version of cups for OS/2 including useful OS/2 amd DOS/Win-OS/2 application support, working lpr or line printers on local parallel and serial ports.

I don't really see what CUPS has to do with networks. Yes, it can be used to share printers from a central server, but it's also the printing system used on just about every modern linux client, as well as for MacOS....
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: ak120 on December 06, 2015, 12:10:23 pm
CUPS for OS/2 relies on TCP/IP and at least a HPFS file system. For a non-networked small footprint OS/2 system that means additional 50 megabytes of wasted space at system's partition. When installed from WPI archives which seems to be recommended by eCups webpage the size of installed files (cups, driver, ghostscript) uses over 100 megabytes totally. This is also caused by packaging and it could be reduced by over 43 mb. I don't think that average users will need all header files and import libraries for printing. Why this packages have to include all this not accessable documentation (manpages, odt-files) and almost useless localisations?

Btw. good old MacOS doesn't use CUPS at all. I have to use it here (with dogcow of course) for Adobe Acrobat and Aldus Freehand, which were unfortunately never available under native OS/2.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Pete on December 06, 2015, 06:25:26 pm
Hi Andreas

How many of the drivers installed to [BootDrive]:\OS2\BOOT do you use? Most of us only use a few but the installer puts every driver that may be needed. Is that just in case we change hardware configuration in the future?

Just trying to draw a comparison with cups...

You could possibly go through the cups installation and remove unneeded files eg man pages but be careful you do not remove something you later need.

There is a man reader somewhere, possibly hobbes, but the online docs do the same job.

Does cups need tcpip to print locally?
I don't think so but it is a long time since I last had a local printer I may be wrong.

You may need a [BootDrive]:\tcip\bin directory to put the cupslpr.exe file into but there is nothing stopping a user from creating that directory on a non-tcpip-installed system and adding it to the config.sys PATH.

OTOH: you could probably install this file to another directory in the config.sys PATH - I am not sure if it is "hard coded" to BootDrive]:\tcip\bin.

Of course, if you do not have tcpip installed you probably do not have a browser installed which means no using the cups browser interface to setup and test your printer. That means playing "command line cowboy" with all those commands that I have forgotten...

A Mac that does not use cups... Must be Ye Olde Apple Mac  :-) pre-PC hardware and pre-linux?

Out of interest how old is the hardware running OS/2? I ask because it sounds like you may have disk space limitations in these days of Tb sized drives.


Regards

Pete






Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: ak120 on December 08, 2015, 07:31:34 pm
How many of the drivers installed to [BootDrive]:\OS2\BOOT do you use? Most of us only use a few but the installer puts every driver that may be needed. Is that just in case we change hardware configuration in the future?

Just trying to draw a comparison with cups...

Maybe 10 to 20 % of them. But this directory contains only 3 or 4 megabytes to draw a comparsion. Usually I delete not necessary device drivers for microchannel systems by a small REXX procedure after a finished installation.

Quote
You could possibly go through the cups installation and remove unneeded files eg man pages but be careful you do not remove something you later need.

There is a man reader somewhere, possibly hobbes, but the online docs do the same job.

A large part of documentation is only useful for developers or administrators. I doubt that average and users are able to install and use man page viewers under OS/2. Of course there's cawf as a small solution for command line paging, but it has some limitations. I never complained about man pages with XFree86/2 but there it was working almost out of the box by xman. Even the developers doing the port seem to hate man pages, otherwise they would convert them automatically to INF-files at time of the build.

Quote
Does cups need tcpip to print locally?
I don't think so but it is a long time since I last had a local printer I may be wrong.

All included executables and DLL is dynamically linked against TCPIP32.DLL. It becomes much worse for printers connected through serial and parallel ports. Then you have to run additionally a local LP daemon.

Quote
You may need a [BootDrive]:\tcip\bin directory to put the cupslpr.exe file into but there is nothing stopping a user from creating that directory on a non-tcpip-installed system and adding it to the config.sys PATH.

OTOH: you could probably install this file to another directory in the config.sys PATH - I am not sure if it is "hard coded" to BootDrive]:\tcip\bin.

Of course paths are hardcoded. But I'm aware of it. But documentation is not very friendly to end users in this area.

Quote
Of course, if you do not have tcpip installed you probably do not have a browser installed which means no using the cups browser interface to setup and test your printer. That means playing "command line cowboy" with all those commands that I have forgotten...

Because CUPSD also includes an integrated web server etc. it's not possible at all. But again, probaly nobody tested the command line tools. The included localization files (which use GNU gettext?) are in UTF-8, so it looks like garbage on non-english systems and causes additional headache.

Quote
A Mac that does not use cups... Must be Ye Olde Apple Mac  :-) pre-PC hardware and pre-linux?

It's a PowerMac G4, one of last ones that are able to run native MacOS 9. Ok, I could also use Snow Leopard which still included Rosetta emulation on newer devices. But that's too much effort for just running FreeHand and Acrobat.

Quote
Out of interest how old is the hardware running OS/2? I ask because it sounds like you may have disk space limitations in these days of Tb sized drives.

They were mostly control devices at ages from 0 to 15 years. I don't know any reliable backup and restore solution for stand-alone systems that could handle Tb sizes nowadays under OS/2. So some of the devices only contain only CF cards that have to contain everything and were connected to process printers or barcode devices. Not everybody wants to pay extra money for connected industrial ethernet stuff.

For development and administration workstations it's not a big problem to have more storage space for printing system (than for the base OS itself) available. But on production systems it will increase (doubles) downtimes for creating backups of a system partition.

To make it clear, here is no hostility against people who tried to make CUPS working under OS/2. But to make it ready for an end user it's a long way to go.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Pete on December 08, 2015, 08:13:59 pm
Hi Andreas

You may want to contact those more directly involved with cups, Paul and Alex, to see if it is possible to "customise" a cups installation to your precise requirements.

I do not know if it can be done or how long it could take but think that it would be worthy of a reasonable size "donation" in respect of time and effort if either of them can sort cups to your requirements.


Regards

Pete

Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Dariusz Piatkowski on February 06, 2016, 01:55:10 am
Guys!!!

Great news...I was a little delayed in getting this through, but I finally managed to pick up the printer locally (Staples Canada matched the on-line sales price, thumbs-up to them).

Anyways, glad to report the printer is chugging along quite nicely. So after I extracted the PPD file from the Win version of the driver package I proceeded with the import using Alex's drivers (PSPRINT 30.905). No errors were encountered, I then setup a new SLPR port and off I went.

All current apps readily print w/o any problems. The printer is a speedy little thing, at least as compared to my HL1650 machine. The Postscript options listed in Windows are all recognized by the OS/2 driver.

OK, so all good news....BUUUUTTTT....there is always a "but" right? LOL

Well, not all that bad of a "but", rather a simple definition of a printer control. So the 5470dw printer driver moves the "Resolution" settings to the "Features" tab of the driver settings. No big deal, I can still access them and as I make the changes I see that the printed output matches. However, my HL1650 shows the resolution controls in the "Output" tab. So at least from my liking perspective I would like to maintain this. Now from the "will it work elsewhere" perspective (and I have no idea if there is some sort of dependency here or not) I am worried that the only option in the 5470dw is 600dpi and therefore if an application is actually looking for the printer resolution capability it may in fact force 600dpi print output.

Looking at the PPD files here is how the HL1650 and 5470dw drivers differ:

1) HL1650

*%%%%% Resolution and Appearance Control %%%%%
*OpenUI *Resolution: PickOne
*OrderDependency: 11 AnySetup *Resolution
*DefaultResolution: 600dpi
*Resolution   300dpi: "<</HWResolution [300 300] >> setpagedevice"
*Resolution   600dpi: "<</HWResolution [600 600] >> setpagedevice"
*Resolution   1200dpi: "<</HWResolution [1200 1200] >> setpagedevice"
*CloseUI: *Resolution

2) 5470dw

*%%%%% Resolution and Appearance Control %%%%%
*DefaultResolution: 600dpi
*OpenUI *CAPT/Print Quality:PickOne
*OrderDependency: 10 AnySetup *CAPT
*DefaultCAPT: Middle
*CAPT   SFine/1200 dpi: "<</HWResolution [1200 1200] >> setpagedevice
statusdict/true1200 known{statusdict begin true true1200 end}if
"
*CAPT   Fine/HQ 1200: "<</HWResolution [1200 1200] >> setpagedevice
statusdict/true1200 known{statusdict begin false true1200 end}if
"
*CAPT   Middle/600 dpi: "<</HWResolution [600 600] >> setpagedevice"
*CAPT Low/300 dpi: "<</HWResolution [300 300] >> setpagedevice"
*CloseUI: *CAPT

I have not looked up any Postscript references yet to see if I can actually move my 5470dw "CAPT" settings over to the "Resolution" definition, but both printers claim to support Postscript 1.3, therefore I have no reason to suspect that the 5470dw PPD could not be successfully re-written to move the options to the "Resolution" definition.

If anyone has some input on this I'd love to see them. I will most likely give this a try over the weekend.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 06, 2016, 09:57:01 am
Hello
The linux driver show this for this printer:
Code: [Select]
*%%%%% Resolution and Appearance Control %%%%%
*OpenUI *Resolution: PickOne
*OrderDependency: 11 AnySetup *Resolution
*DefaultResolution: 600dpi
*Resolution 300dpi: "                      "
*Resolution 600dpi: "                      "
*Resolution 2400x600dpi/HQ1200dpi: "                    "
*Resolution 1200dpi: "                    "
*CloseUI: *Resolution
The difference is in 1200x1200 do not exits, but you have 2400x600 = 1200

I send you the linux cups ppd file for this priinter, you can test it, to import.
Saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Dariusz Piatkowski on February 07, 2016, 06:10:00 am
So I took Roberto's Linux/cups based PPD and re-fitted the Brother PPD with the *Resolution section, I preserved the 'setpagedevice' settings from the Brother drivers:

=== START ===
*%%%%% Resolution and Appearance Control %%%%%
*OpenUI *Resolution: PickOne
*OrderDependency: 11 AnySetup *Resolution
*DefaultResolution: 600dpi
*Resolution   300dpi: "<</HWResolution [300 300] >> setpagedevice"
*Resolution   600dpi: "<</HWResolution [600 600] >> setpagedevice"
*Resolution   HQ1200dpi: "<</HWResolution [1200 1200] >> setpagedevice
statusdict/true1200 known{statusdict begin false true1200 end}if
"
*Resolution   1200dpi: "<</HWResolution [1200 1200] >> setpagedevice
statusdict/true1200 known{statusdict begin true true1200 end}if
"
*CloseUI: *Resolution
=== END ===

However....somewhat strangely enough, I am getting the following error out of PIN.EXE:

=== START ===
[G:\TEST\PSCRIPT]pin ppd \test\pscript\5470 \test\pscript\5470
PostScript resource packaging utility version 1.00
Copyright (c) IBM Corp. 2000,2001. All rights reserved.

Producing Printer Device PAK
reading driver extended attributes
  fail
SYS0005: Access is denied.

fail
=== END ===

Almost looks like the PSCRIPT.DRV file is throwing the 'Access is denied' error...is this some kind of OS/2 built in protection mechanism on the PSSCRIPT.DRV file??? I copied a fresh ZIP of the PSCRIPT 30.800 driver to my test directory so as to avoid any issues attempting to update the existing driver in \os2\dll\pscript.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 07, 2016, 08:38:43 am
The text was put to draw more attention of many ppd files for windows were created erroneously . But the same file for linux works best.
I enclose the entire file import created by Alex , and three files imported properly, following his instructions.
I've put three new printers:
brother-HL-5470DW-cups-en.ppd (this is your printer)
brother-MFCL2720DW-cups-en.ppd (my printer works ok)
hl2030-cups.ppd (this other ?, is other link in this foro hl-2035 ? only exist in brother hl2030 and hl2040 but not hl2035)

Instructions for use:
Only unzip the file, open the folder, open x:\xxxxxx\psprint-30_905-import\psprint.drv , select your printer, and drag & drop to your desktop
Say if it works or not.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Matt Walsh on February 07, 2016, 05:22:03 pm
For my Brother HL-3070CW I juts installed the OS/2 PSCRIPT.Apple LaserWriter 16/600 PS driver and it worked without a hitch. I used the SLPR driver for a network port and it's fine.  Just for your consideration.
Matt W.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Greg Pringle on February 07, 2016, 05:48:46 pm
How good is the color output using OS/2.
I have a Brother HL 4040CDN that is using the HP C LaserJet 8550 driver which works but has low resolution color output.
It is not being run with the Postscript driver.

Can high quality color be printed with OS/2 ?
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Dariusz Piatkowski on February 08, 2016, 05:32:57 am
...However....somewhat strangely enough, I am getting the following error out of PIN.EXE:

=== START ===
[G:\TEST\PSCRIPT]pin ppd \test\pscript\5470 \test\pscript\5470
PostScript resource packaging utility version 1.00
Copyright (c) IBM Corp. 2000,2001. All rights reserved.

Producing Printer Device PAK
reading driver extended attributes
  fail
SYS0005: Access is denied.

fail
=== END ===...

Well, this is embarrasing...notice my "pin" command above, for some reason my problem was the fact that the last parameter is a fully qualified reference to the PSCRIPT.DRV file, that means, it needed to be stated as "\test\pscript\5470\pscript.drv", I simply left out the actual printer driver filename...duh....

OK, having overcome that obstacle I must report on some findings.

The as-is Brother PPD, where the print quality is left in the "Features" section does not appear to actually impact print quality in our OS/2 driver. So, in other words, when the default resolution is 600dpi, no matter what I select in the Features section of the driver I still ONLY get 600dpi output. Yeah...you bet, that's lousy!!!

So as it turns out the only way to make this work is by moving the whole Features print quality section over to the Output tab under Resolution. However, as I did that and as I preserved the Brother device controls I found out that the HQ1200 mode consistently crashes the driver. So whatever app I'm actually trying to print for, if I select HQ1200 Resolution the app will crash.

Since both 1200 and HQ1200 appear to be coded using the same HWResolution parameters but different  statusdict settings it appears that I can only use the 1200dpi (highest-resolution) settings reliably.

*CAPT   SFine/1200 dpi: "<</HWResolution [1200 1200] >> setpagedevice
statusdict/true1200 known{statusdict begin true true1200 end}if"

*CAPT   Fine/HQ 1200: "<</HWResolution [1200 1200] >> setpagedevice
statusdict/true1200 known{statusdict begin false true1200 end}if"

Anyways...I will experiment with a few more configurations, but for now at least I have no way to understand why HQ1200 crashes the driver.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 08, 2016, 09:12:43 am
Hello Dariusz Piatkowski,
We did not say if the ppd you're using is Windows or Linux is to drop you at the forum. Or is a edit manual ppd by you.

You not tell us if you tried the file psprint-30_905-import.zip in this foro.


Saludos

Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 08, 2016, 12:45:33 pm
For my Brother HL-3070CW I juts installed the OS/2 PSCRIPT.Apple LaserWriter 16/600 PS driver and it worked without a hitch. I used the SLPR driver for a network port and it's fine.  Just for your consideration.
Matt W.
If you is working well , I would not touch it .
But if you want to prove I can make a new file including this printer.
I think you will not have any advantage. That adds nothing to the driver you already have .
Saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 08, 2016, 01:14:29 pm
How good is the color output using OS/2.
I have a Brother HL 4040CDN that is using the HP C LaserJet 8550 driver which works but has low resolution color output.
It is not being run with the Postscript driver.

Can high quality color be printed with OS/2 ?
I can include you this printer in a new file . In this case if you can find differences , and you should try it .
I have no intention of making a new printer for each there . My intention is to make:
 How to import a ppd file .

Because I see the need . And if I understand where others fail , I will do better.
It is no use if only work for me , but in my case I have had good experiences.
Saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 08, 2016, 05:23:44 pm
Hello Greg Pringle

I include the file for your test. With this other printers.
Please comment if work for you.!!
Instructions for use:
Only unzip the file, open the folder, open x:\xxxxxx\psprint-30_905-import2\psprint.drv , select your printer, and drag & drop to your desktop
Say if it works or not.

  PPD converter initialized
READY, STARTING TO CONVERT
converting brhl4040cdn-CUPS-OS2.ppd : ........ OK (Brother HL-4040CDN series)
converting brother-HL-5470DW-cups-en.ppd : ........ OK (Brother HL-5470DW)
converting brother-MFCL2720DW-cups-en.ppd : ........ OK (Brother MFC-L2720DW)
converting brother_hl3070cw_printer_en-OS2.ppd : ........ OK (Brother HL3070CW)
converting hl2030-cups.ppd : ........ OK (Brother HL2030 for CUPS)
converting Xerox_Phaser_6500Nos2delinux.ppd : ........ OK (Xerox Phaser 6500Nlin
ux)
done: 6 devices converted, 0 failed
FINISHED, SHUTTING DOWN
done

Saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 08, 2016, 09:19:45 pm
Sorry , sorry, the last file is wrong , I have to check , do not download . Is bad .
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 08, 2016, 10:21:36 pm
The as-is Brother PPD, where the print quality is left in the "Features" section does not appear to actually impact print quality in our OS/2 driver. So, in other words, when the default resolution is 600dpi, no matter what I select in the Features section of the driver I still ONLY get 600dpi output. Yeah...you bet, that's lousy!!!
Now I think I begin to understand .

Quote
So as it turns out the only way to make this work is by moving the whole Features print quality section over to the Output tab under Resolution. However, as I did that and as I preserved the Brother device controls I found out that the HQ1200 mode consistently crashes the driver. So whatever app I'm actually trying to print for, if I select HQ1200 Resolution the app will crash.
I increase the resolution to my PSPRINT.Brother MFC-L2720DW BR-Script3, to HQ1200 and print a white paper. But I open the printer --select printer driver ---options-- and print font capacity   And the printer print a page with this info:
-----ini print text---------------
Available Font Memory (bytes) = 16103784
Suggested Maximun Downloaded Fonts : 32
------end print text------------
In the driver show me 110 fonts, I reduce it to 32. Save and close.
After this is printing ok, with epm.exe, , and with lucide the text does not start in the right place , moved out .
If modify in Jobs properties High Quality Print ON or OFF, in epm.exe is the same, but in lucide, move to other bad position.

Quote
Since both 1200 and HQ1200 appear to be coded using the same HWResolution parameters but different  statusdict settings it appears that I can only use the 1200dpi (highest-resolution) settings reliably.

*CAPT   SFine/1200 dpi: "<</HWResolution [1200 1200] >> setpagedevice
statusdict/true1200 known{statusdict begin true true1200 end}if"

*CAPT   Fine/HQ 1200: "<</HWResolution [1200 1200] >> setpagedevice
statusdict/true1200 known{statusdict begin false true1200 end}if"
I think that this is the same if you change the Jobs properties HQP ON OFF.
Quote
Anyways...I will experiment with a few more configurations, but for now at least I have no way to understand why HQ1200 crashes the driver.
Check your fonts number, more low value.But the high resolution is possibly other unwanted problems .
Saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Dariusz Piatkowski on February 10, 2016, 02:32:35 am
Hi Roberto!

The as-is Brother PPD, where the print quality is left in the "Features" section does not appear to actually impact print quality in our OS/2 driver. So, in other words, when the default resolution is 600dpi, no matter what I select in the Features section of the driver I still ONLY get 600dpi output. Yeah...you bet, that's lousy!!!
Now I think I begin to understand .

Sorry, I wrote in my earlier post that I was using psprint 30.905 driver...easily missed though...no worries.

Quote
I increase the resolution to my PSPRINT.Brother MFC-L2720DW BR-Script3, to HQ1200 and print a white paper. But I open the printer --select printer driver ---options-- and print font capacity   And the printer print a page with this info:
-----ini print text---------------
Available Font Memory (bytes) = 16103784
Suggested Maximun Downloaded Fonts : 32
------end print text------------
In the driver show me 110 fonts, I reduce it to 32. Save and close.
After this is printing ok, with epm.exe, , and with lucide the text does not start in the right place , moved out .
If modify in Jobs properties High Quality Print ON or OFF, in epm.exe is the same, but in lucide, move to other bad position.

Yeah...I'm starting to see some weird things here...in particular...if I print using PSPRINT driver and embed fonts in my print job, the output is garbled, now this is ONLY with a simple TXT file...however, the full text prints on a single line.

If on the other hand I disable font embedding (by setting the driver=>Output=>Use Downloaded Fonts to OFF) then I have a good printout, text prints OK as it should in the place it should. Of course this approach defeats the purpose of running PSPRINT as opposed to PSCRIPT, since the benefit of PSPRINT is being able to embed fonts.

With my printer the driver suggests I use up to 78 fonts for the download...which is how I left them.

I will do a PPD import of the modified resolution Brother file into PSCRIPT driver next and see if I'm seeing any differences there.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 10, 2016, 09:27:07 am

Sorry, I wrote in my earlier post that I was using psprint 30.905 driver...easily missed though...no worries.

But care with windows ppd, aprox. 40% of this ppd files are bad files, and worst of all, it means work. Fail with some programs etc. This may be true for the world win , but not for OS/2. Linux or cups ppd are a better option. Remenber the linux file, is necessary to convert to os2 first of all .

[quote ...]with lucide the text does not start in the right place , moved out .[/quote]
Well lucide work perfect, only is need to mark print us image and high resolution.

Quote
Yeah...I'm starting to see some weird things here...
Well!! today all are good news.

The file psprint-30_905-import3.zip, This well-it built, and it works perfect . But there is always a but, the problem is an error in the import file itself.It only works if the first printer that is installed on the system.
But the solution is simple, after you drag and drop the printer to desktop, open it properties--- and see physical name of the printer. Write in a paper the name.
Delete the printer and delete the driver.
Go to folder c:\os2\dll\psprint and rename psprint with the physical name.(in this point I am not sure is only change the name of the folder is sufficient, but I tell you that I miss me.  )
Goto C:\OS2\DLL\YOURPHYSICALNAMEPRINT\PSPRINT.DRV , open it and install again, this create a new pscript folder and all is ok.
Or No?

Hear is the page for the import utility from Alex Taylor:
http://www.altsan.org/os2/printing/index.html

Saludos


Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: David McKenna on February 10, 2016, 01:00:07 pm
Yeah...I'm starting to see some weird things here...in particular...if I print using PSPRINT driver and embed fonts in my print job, the output is garbled, now this is ONLY with a simple TXT file...however, the full text prints on a single line.

  I've seen this with TXT files. Here, if I turn off word wrap, the file prints fine. I only see the single line printing if word wrap is on. Never thought it was a print driver problem... should report this to Alex.

Regards
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Alex Taylor on February 10, 2016, 06:32:01 pm
Two suggestions... First, print to file and compare the output Postscript file for both the working and non-working scenarios.
Second, try varying the font used for printing text format (printer object properties, tab 'Text Format', font option).
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 10, 2016, 10:19:25 pm
I wanted to explain a little better had detected the problem, was that after installing the printer. The printer icon is created , but could not open the driver properties and can not open the Job properties.
Saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Dariusz Piatkowski on February 11, 2016, 05:17:35 am
Hi Alex,

Two suggestions... First, print to file and compare the output Postscript file for both the working and non-working scenarios.
Second, try varying the font used for printing text format (printer object properties, tab 'Text Format', font option).

Great suggestions...I had actually ventured down that road last night hoping to sneak a peek at what the driver is actualy building in the print job itself. Specifically I was hoping to see the HQ1200 vs 1200 dpi resolution settings.

As it turned out, even a basic TXT file when using the PSPRINT driver produced a fairly large output job when printed @ 1200dpi, here is a quick comparison:

2-09-16   8:50p      9665           0  output_pscript_1200.txt
2-09-16   8:11p    568252           0  output_ps_1200.txt
2-09-16   8:17p      9343           0  output_ps_1200_nofont.txt
2-09-16   8:16p      9218           0  output_ps_300.txt
2-09-16   8:14p      9224           0  output_ps_600.txt

the output_ps* files are from your PSPRINT driver, whereas the single output_pscript_1200.txt file is from the IBM PSCRIPT driver. what I found strange is that at the lower resolutions the resulting text files did NOT embed fonts, whereas at the 1200dpi they did.

Finally, HQ1200 failed to print altogether where I would encounter a crash in the PSPRINT driver itself, here is the entry from my POPUPLOG.OS2 file:

=== START ===
G:\OS2\PMSPOOL.EXE
c000009b
163e0bdc
EAX=00000000  EBX=0000002c  ECX=00000000  EDX=00000000
ESI=0283000c  EDI=02771400 
DS=0053  DSACC=f0f3  DSLIM=ffffffff 
ES=0053  ESACC=f0f3  ESLIM=ffffffff 
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:163e0bdc  CSACC=f0df  CSLIM=ffffffff
SS:ESP=0053:02525bac  SSACC=f0f3  SSLIM=ffffffff
EBP=02525c6c  FLG=00010246

PSPRINT.DRV 0001:00040bdc
=== END ===

The good news (I suppose/hope...???) is that the crash was consistent between the PSCRIPT and PSPRINT drivers, here is the matching log for the PSCRIPT driver:

=== START ===
G:\OS2\PMSPOOL.EXE
c000009b
1657d46c
EAX=00000000  EBX=0000002c  ECX=00000000  EDX=00000000
ESI=0285000c  EDI=02791400 
DS=0053  DSACC=f0f3  DSLIM=ffffffff 
ES=0053  ESACC=f0f3  ESLIM=ffffffff 
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:1657d46c  CSACC=f0df  CSLIM=ffffffff
SS:ESP=0053:02565aac  SSACC=f0f3  SSLIM=ffffffff
EBP=02565b6c  FLG=00010246

PSCRIPT.DRV 0001:0002d46c
=== END ===

Both the crashes produced a SYS3184 error.

Any chance you can troubleshoot this? While printing from your AE editor I was actually getting a "divide by zero" error...but no log in POPUPLOG.OS2.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: David McKenna on February 12, 2016, 03:45:35 am
Two suggestions... First, print to file and compare the output Postscript file for both the working and non-working scenarios.
Second, try varying the font used for printing text format (printer object properties, tab 'Text Format', font option).

 Interesting. I printed a small TXT file using AE to file with word wrap on and off using your PSPrint driver with the default font set. I will attach the file and results which are radically different. Maybe you can make sense of it...

Regards
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Dariusz Piatkowski on February 12, 2016, 05:14:00 am
...I printed a small TXT file using AE to file with word wrap on and off using your PSPrint driver with the default font set. I will attach the file and results which are radically different....

Interesting indeed...WRAPON includes the embedded font, WRAPOFF does not.

Further on:

WRAPON translates the font to CourierNew
WRAPOFF simply maps it to Courier

Similar to what I'm seeing with PSPRINT driver and high res:
1200dpi embeds CourierNew...while PSPRINT driver with high res but "No embed" maps to Courier only

Meanwhile, PSCRIPT maps to Courier regardless of what resolution I pick.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 12, 2016, 12:49:07 pm
Hello,
Well, I do not understand what are you doing to get that error.Can you explain in detail your settings .
With the printer HL-5470dw send to ps printing a file , I have no such error, in HQ and with and without font courier new, mark and without mark in options, use downloaded fonts.
I'm using this printer from this psprint-30_905-import3.zip file.

Saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Dariusz Piatkowski on February 13, 2016, 12:11:22 am
...Well, I do not understand what are you doing to get that error.Can you explain in detail your setting...

I am simply selecting HQ1200 in the Output=>Resolution section of the print driver. The minute I try to send a print job using HQ1200 the actual driver (PSPRINT & PSCRIPT) crashes.

...With the printer HL-5470dw send to ps printing a file , I have no such error, in HQ and with and without font courier new, mark and without mark in options, use downloaded fonts....

OK, but what printer are you actualy using? I did not think you have the same Brother HL-5470DW model that I have. So if you have something different our results may very well be quite different.

Here is another take on this: in the built AuxPrinter pak you kindly made available you have not included the actual PPD, therefore, I can not tell what settings you defined for the HQ1200 and 1200dpi settings. In my case the settings are different, otherwise if the driver simply passes the "<</HWResolution [1200 1200] >>" command to the printer it will not actually set it properly.

Here is what is contained in my final print job, which is a PS file:

%%BeginFeature: *Resolution 1200dpi
<</HWResolution [1200 1200] >> setpagedevice
statusdict/true1200 known{statusdict begin true true1200 end}if
%%EndFeature

So the whole <BeginFeature> -- <EndFeature> is a control string, and this is a different value for 1200dpi vs HQ1200.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Alex Taylor on February 13, 2016, 01:39:23 pm
This crash strongly suggests that PIN couldn't cope with the PPD. 

Try printing using the 'Generic Postscript (Enhanced)' model and see if you have better luck.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 13, 2016, 01:44:38 pm
Quote
I am simply selecting HQ1200 in the Output=>Resolution section of the print driver. The minute I try to send a print job using HQ1200 the actual driver (PSPRINT & PSCRIPT) crashes.
This is what you would expect . If you want to go with fiat 500 to 300kmh . You're defining your printer as having the ability to print an array of 1200x1200 = 1440000 points , and that is not so. Your printer can only print 2400x600 = 1440000 points. In both cases the final resolution is 1200

Quote
OK, but what printer are you actualy using? I did not think you have the same Brother HL-5470DW model that I have. So if you have something different our results may very well be quite different.
I have not the printer, but David McKenna , he showed us the text , and files generated with the same text, expecting a similar result. As you said , you went out on a line text, overwritten .
Quote
Here is another take on this: in the built AuxPrinter pak you kindly made available you have not included the actual PPD, therefore, I can not tell what settings you defined for the HQ1200 and 1200dpi settings. In my case the settings are different, otherwise if the driver simply passes the "<</HWResolution [1200 1200] >>" command to the printer it will not actually set it properly.
In my reply nº13, I send you linux file for this printer, from the manufacture, for this printer model. And you are using a ppd description from other printer capable to print 1200x1200 us HL-5250dn. I no include it in file psprint-30_905-import3.zip, because the size maximun that i can upload to this foro.
Quote
Here is what is contained in my final print job, which is a PS file:

%%BeginFeature: *Resolution 1200dpi
<</HWResolution [1200 1200] >> setpagedevice
statusdict/true1200 known{statusdict begin true true1200 end}if
%%EndFeature

So the whole <BeginFeature> -- <EndFeature> is a control string, and this is a different value for 1200dpi vs HQ1200.
You want print in a diferent resolution that the manufacture propose for this printer, the error is normal. I untherstand.
Saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Dariusz Piatkowski on February 13, 2016, 03:19:31 pm
Alex,

This crash strongly suggests that PIN couldn't cope with the PPD. 

Try printing using the 'Generic Postscript (Enhanced)' model and see if you have better luck.

PIN did not produce any import errors...but indeed, it "feels" like something didn't quite go through correctly. The fact that the as-is PPD configuration of moving the Resolution configuration to the Features section does not work implies that the resulting driver import didn't quite configure things correctly.

Is there anything else I can do to better understand what is causing the failure with HQ1200 setting?
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Dariusz Piatkowski on February 13, 2016, 03:40:21 pm
Roberto,

...This is what you would expect . If you want to go with fiat 500 to 300kmh . You're defining your printer as having the ability to print an array of 1200x1200 = 1440000 points , and that is not so. Your printer can only print 2400x600 = 1440000 points. In both cases the final resolution is 1200

Oh boy, your interpretation of what I'm attempting to do is quite incorrect.

The printer (HL-5470DW) very much has the capability I am instructing it to use. The specs state the following:
1) 1200 dpi = 1200x1200
2) HQ1200 = 2400x600

...so it certainly can print HQ1200 at the resolution I specify in the PPD control string, but it is the additional control parameter that actually "translate" the [1200 1200] to [2400 600] resulting dpi setting.

I've attached the Brother PPD file with the Features section defintion and my final PPD with the Resolution section definition.

...In my reply nº13, I send you linux file for this printer, from the manufacture, for this printer model. And you are using a ppd description from other printer capable to print 1200x1200 us HL-5250dn....

Oh no, that is absolutely incorrect. The PPD files I'm using are the original Brother HL-5470DW PPD files. I am not using another model PPD (as you suggested the HL-5250dn). So from that perspective my results suggest that the Brother PPD defined printer features can not be successfully used in OS/2 given either the PSCRIPT or PSPRINT drivers.

...You want print in a diferent resolution that the manufacture propose for this printer, the error is normal. I untherstand...

No. Again, please take a look at the attached PPD files I am actually working with. These are original Brother HL-5470DW files with only difference being a shift of the Features section to the Resolution section.

I've also attached the Brother SPECs PDF for this particular printer.

Meanwhile, the Linux "driver" files I have looked at all reference CUPS print system. So the actual details of what's contained in the PPD itself actually tell nothing about sending direct JCL statement to the printer, case in point, here is the matching Resolution section:

=== START ===
*%==== 5.14 Finishing Features =================================
*%%%%% Resolution and Appearance Control %%%%%
*OpenUI *Resolution: PickOne
*OrderDependency: 11 AnySetup *Resolution
*DefaultResolution: 600dpi
*Resolution   300dpi: "                      "
*Resolution   600dpi: "                      "
*Resolution   2400x600dpi/HQ1200dpi: "                    "
*Resolution   1200dpi: "                    "
*CloseUI: *Resolution
=== END ===

I've also attached that file to this post.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: ivan on February 13, 2016, 10:16:59 pm
Hi Dariusz,

I think the root of the problem is in your statement
Quote
the Linux "driver" files I have looked at all reference CUPS print system

Almost all laser printers have a basic engine resolution of 600 dpi.  Anything above that is provided as a function of the driver with the PPD only telling the driver what to show in is settings page.  This is true for the windows, OS x and CUPS drivers.

I don't think any native OS/2 driver, laser or otherwise, sees anything beyond 600 dpi. By asking for 1200 dpi the driver does not know how to interpret that and, being dumb, sends the wrong code to the printer.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Dariusz Piatkowski on February 13, 2016, 11:36:01 pm
...I think the root of the problem is in your statement
Quote
the Linux "driver" files I have looked at all reference CUPS print system

Almost all laser printers have a basic engine resolution of 600 dpi.  Anything above that is provided as a function of the driver with the PPD only telling the driver what to show in is settings page.  This is true for the windows, OS x and CUPS drivers.

I don't think any native OS/2 driver, laser or otherwise, sees anything beyond 600 dpi. By asking for 1200 dpi the driver does not know how to interpret that and, being dumb, sends the wrong code to the printer.

Hmm...OK, point noted. However when I print here there is a very real difference between the output of a 600dpi vs 1200dpi print job. So it appears at least that the PPD supplied Postscript job control "string" does somehow cause the driver itself to format the remainder of the print job into a higher resolution. It is only the HQ1200 setting that causes the OS/2 print driver to crash.

Take a peek at the attached output files, these are a result of:

1) producing a Postscript job on win7 using Brother HL-5470DW Postrcript drivers (win_xxx)
2) producing a Postscript job on OS/2 using Brother HL-5470DW PPD and PSCRIPT driver (pscript_xxx)
3) producing a Postscript job on OS/2 using Brother HL-5470DW PPD and PSPRINT driver (psprint_xxx)
4) producing a Postscript job on OS/2 using Generic Postscript (Enhanced) PPD and PSPRINT driver (as per Alex's earlier suggestion) (genen_xxx)

You will find that in the win7 produced print jobs the ONLY difference is the PPD supplied control string for HQ1200 resolution, namely:

1200dpi
======
featurebegin{
%%BeginFeature: *CAPT SFine
<</HWResolution [1200 1200] >> setpagedevice
statusdict/true1200 known{statusdict begin true true1200 end}if

%%EndFeature
}featurecleanup

HQ1200
======
featurebegin{
%%BeginFeature: *CAPT Fine
<</HWResolution [1200 1200] >> setpagedevice
statusdict/true1200 known{statusdict begin false true1200 end}if

%%EndFeature
}featurecleanup

For some reason that HQ1200 control string is causing our OS/2 driver to die.

Alright...how the heck does one debug a printer driver? Alex??? lol...what's the "secret sauce" to actually do this with?
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 14, 2016, 03:51:41 pm
Hello
The 2 files brp5470......ppd are not pscript, are PCL5 or PCL6, this is a HP LaserJet code.
*%==== PostScript Patches ==========
*%*JobPatchFile 1: "statusdict/setusbbinary known{statusdict begin true setusbbinary end}if"

*%==== JCL Features ==========================
*%JCLBegin:           "<1B>%-12345X@PJL JOB<0A>"
*%JCLToPSInterpreter: "@PJL ENTER LANGUAGE = POSTSCRIPT <0A>"
*%JCLEnd:             "<1B>%-12345X@PJL EOJ <0A><1B>%-12345X"

You can comment me your doing your printer with the file that I send to the forum, in these two resolutions
1º      600
2nd  1200

Saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Dariusz Piatkowski on February 15, 2016, 02:17:18 am
...The 2 files brp5470......ppd are not pscript, are PCL5 or PCL6, this is a HP LaserJet code.
*%==== PostScript Patches ==========
*%*JobPatchFile 1: "statusdict/setusbbinary known{statusdict begin true setusbbinary end}if"

*%==== JCL Features ==========================
*%JCLBegin:           "<1B>%-12345X@PJL JOB<0A>"
*%JCLToPSInterpreter: "@PJL ENTER LANGUAGE = POSTSCRIPT <0A>"
*%JCLEnd:             "<1B>%-12345X@PJL EOJ <0A><1B>%-12345X"
...

I'm sorry, but the very same files you picked that section from start as follows:

=== START ===
*PPD-Adobe: "4.3"
*%================================================
*%   Copyright(C) 2012 Brother Industries, Ltd.
*%   "Brother HL-5470DW BR-Script3"
*%================================================

*%==== General Information Keywords ========================
*FormatVersion: "4.3"
*FileVersion: "1.0"
*LanguageEncoding: OS2-850
*LanguageVersion: English
*Manufacturer: "Brother"
*PCFileName: "BRP5470E.PPD"
*Product: "(Brother HL-5470DW series)"
*PSVersion: "(3010.106) 5"
*ShortNickName: "Brother HL-5470DW BR-Script3"
*ModelName: "Brother HL-5470DW BR-Script3"
*NickName: "Brother HL-5470DW BR-Script3"
...
=== END ===

So YES, these in fact are printer PPDs, they describe the printer controls using Postscript formatting/control statements. The output files I included are also poscript raw jobs, literally, stuff that normally would have gone out to the printer but was instead re-directed to a flat file.

Anyways, the JCL section you pointed out tells the printer to invoke the Postscript interpreter for this particular printer. In fact, the WIN7 generated files actually show this taking effect:

=== START ===
%-12345X@PJL JOB
@PJL SET STRINGCODESET=HPROMAN8
@PJL ENTER LANGUAGE=POSTSCRIPT
%!PS-Adobe-3.0
...
=== END ===

I've attached the "PostScript - Printer Description File Format Specification - PPD_Spec_v4_3" for reference, it goes into much more details then what I can make sense of at the moment...LOL

As I stated before, my printer works great with all resolutions but HQ1200, your PPD definitions do not address this, they are only for standard dpi resolutions.
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 15, 2016, 09:08:58 am
Sorry but I left the thread.
If anyone wants to know more I recommend you read this thread :
http://www.os2world.com/forum/index.php/topic,896.0.html

The psprint-30_905-import3.zip file has an interesting mistake, if you install the printer Brother MFC-L2720DW , if you mark the folder as hold, you can retain the fonts that are sent to the printer.
This error affects only the installation in some cases,and  installing fonts , but not to the printing itself in all its various resolutions .
If after installation you want to delete , you only have to remove the printer, the driver , and rename or delete the psprint folder.
Saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Alex Taylor on February 15, 2016, 12:18:55 pm
Interesting. I printed a small TXT file using AE to file with word wrap on and off using your PSPrint driver with the default font set. I will attach the file and results which are radically different. Maybe you can make sense of it...

I think AE either does or causes some weird things with the fonts, I was testing here and couldn't get AE to embed the font at all despite.

Regarding the garbled text, it appears that if a TT font is embedded, the character and line advances are all wrong.  It is wrapping the text, it's just that it thinks each character is a fraction of its proper width, and the line is also not advanced when it wraps (or, probably more accurately, it's calculating the line advance as 0).  I can reproduce this, but I have as yet no answer for why it's happening.  It's quite possible I missed implementing some necessary logic somewhere.  You can circumvent the problem by setting the default text font to a Type 1 font like Courier (not New), since the PS font embedding logic appears unaffected.

This seems to be unrelated to the crash you are getting with the super-fine dpi resolution for the Brother printer.  I will note that I have a Brother printer driver (HL-3075), and if I print a text file with resolution set to anything above 600, the page appears blank (although there is no crash). 
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 15, 2016, 05:38:16 pm
  I will note that I have a Brother printer driver (HL-3075), and if I print a text file with resolution set to anything above 600, the page appears blank (although there is no crash).
You have to print device font capacity, and reduce the numbers of fonts, to the number that your print capacity or less.
Iam printing in 2 brothers with HQ1200, without problems with linux ppd files, you can test.

I attach 2 files, one have the font courier,type1 for charge, and the file for delete the font. I drag and drop to the printer and give me a error, this is a capture of the font.
ERROR NAME:
undefined
COMMAND;
OPERAND STACK;
The idea is to send and test the font without your program.

Saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Alex Taylor on February 16, 2016, 10:22:35 am
Alright...how the heck does one debug a printer driver? Alex??? lol...what's the "secret sauce" to actually do this with?

You're on the right track already. Basically, dig into the job's Postscript output until you find the bit that's causing the problem, and then figure out what the correct code should look like. :p
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Dariusz Piatkowski on February 16, 2016, 02:08:51 pm
You're on the right track already. Basically, dig into the job's Postscript output until you find the bit that's causing the problem, and then figure out what the correct code should look like. :p

I only wish I could actually get that far...the crash happens before I can successfully print anything...so literally as soon as I try to print using the HQ1200 setting I am getting a "divide by zero" error.

What actually helped is attempting to print from your handy AE, it produces a pretty descriptive error, while most other apps simply crash. I've attached the screenshot of what that error message actually is. This implies that whatever operation the driver attempts to perform to instantitate the HQ1200 mode produces an error which is then sent back to the program, I assume as an API return code?

I'm now looking at the PAK tools/utilities you made available on your site to understand the details of the AUXPRINT.PAK file. My assumption here is that as PIN imported the PPD with the specific control "codes" to put the printer in HQ1200 mode it either did not convert correctly because it did not know how to do it, or it failed to import altogether (although during the PPD import process no errors are generated).
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 18, 2016, 11:32:05 pm
I decided to try to install ppd win7-32 ​​in OS2 .
Commenting that the PPD br- mfc2720dw is very similar to Dariusz , 1200x1200 , but in linux ppd is 2400x600 .
And these are the mistakes that leave me, I put the resolution to HQ1200 , EPM text printing with cigar ... the text remains in the spool , and I get this error:
Code: [Select]

%!
% lib/ehandler.ps -- Downloaded Error Break-page handler
% Copyright (c) 1984, 1985 Adobe Systems Incorporated. All Rights Reserved.
% RCSID: $Header:   L:/pvcs/passion/down21/windown/ehandler.psv   3.0   28 Aug 1992 16:46:42   JKEEFE  $
% assumes serverloop password is the default one
/$brkpage where
{pop(Error Handler in place - not loaded again\n)print flush stop}
{serverdict begin statusdict begin 0000 checkpassword
 {(Error Handler downloaded.\n)print flush 0000 exitserver}
 {(Bad Password on loading error handler!!!\n)print flush stop}ifelse
}ifelse
/$brkpage 64 dict def $brkpage begin
/prnt
 {dup type/stringtype ne{=string cvs}if dup length 6 mul/tx exch def/ty 9 def
  currentpoint/toy exch def/tox exch def 1 setgray newpath
  tox toy 2 sub moveto 0 ty rlineto tx 0 rlineto 0 ty neg rlineto
  closepath fill tox toy moveto 0 setgray show}bind def
/nl{currentpoint exch pop lmargin exch moveto 0 -9 rmoveto}def
/=={/cp 0 def typeprint nl}def
/typeprint{dup type exec}readonly def
/lmargin 72 def
/rmargin 72 def
/tprint
   {dup length cp add rmargin gt{nl/cp 0 def}if
    dup length cp add/cp exch def prnt}readonly def
/cvsprint{=string cvs tprint( )tprint}readonly def
/integertype{cvsprint}readonly def
/realtype{cvsprint}readonly def
/booleantype{cvsprint}readonly def
/operatortype{(--)tprint =string cvs tprint(-- )tprint}readonly def
/marktype{pop(-mark- )tprint}readonly def
/dicttype{pop(-dictionary- )tprint}readonly def
/nulltype{pop(-null- )tprint}readonly def
/filetype{pop(-filestream- )tprint}readonly def
/savetype{pop(-savelevel- )tprint}readonly def
/fonttype{pop(-fontid- )tprint}readonly def
/nametype{dup xcheck not{(/)tprint}if cvsprint}readonly def
/stringtype
 {dup rcheck{(\()tprint tprint(\))tprint}{pop(-string- )tprint}ifelse
 }readonly def
/arraytype
 {dup rcheck{dup xcheck
  {({)tprint{typeprint}forall(})tprint}
  {([)tprint{typeprint}forall(])tprint}ifelse}{pop(-array- )tprint}ifelse
 }readonly def
/packedarraytype
 {dup rcheck{dup xcheck
  {({)tprint{typeprint}forall(})tprint}
  {([)tprint{typeprint}forall(])tprint}ifelse}{pop(-packedarray- )tprint}ifelse
 }readonly def
/courier/Courier findfont 9 scalefont def
end %$brkpage
errordict/handleerror
 {systemdict begin $error begin $brkpage begin newerror
   {/newerror false store
    vmstatus pop pop 0 ne{grestoreall}if initgraphics courier setfont
    lmargin 720 moveto(ERROR: )prnt errorname prnt
    nl(OFFENDING COMMAND: )prnt/command load prnt
    $error/ostack
    known{nl nl(STACK:)prnt nl nl $error/ostack get aload length{==}repeat}if
    systemdict/showpage get exec(%%[ Error: )print
    errorname =print(; OffendingCommand: )print/command
    load =print( ]%%)= flush}if end end end}
dup 0 systemdict put dup 4 $brkpage put bind readonly put

At the same time I leave the error in the spool , and try to open any file.ps from the icon, select the file properties >>>  right click>> menu create another  >>>
edit
e.exe
INIS are corrupted as the picture
When I try to open any txt file I get this error image .
saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: Alex Taylor on February 20, 2016, 01:56:41 pm
Quote
You're on the right track already. Basically, dig into the job's Postscript output until you find the bit that's causing the problem, and then figure out what the correct code should look like. :p

I only wish I could actually get that far...the crash happens before I can successfully print anything...so literally as soon as I try to print using the HQ1200 setting I am getting a "divide by zero" error.

What actually helped is attempting to print from your handy AE, it produces a pretty descriptive error, while most other apps simply crash. I've attached the screenshot of what that error message actually is. This implies that whatever operation the driver attempts to perform to instantitate the HQ1200 mode produces an error which is then sent back to the program, I assume as an API return code?

AE is not 'mine' in any way.  But in any case, I think that application just means an uninitialized value (or, more probably, a bad address or invalid pointer) somewhere in the PS driver.  Not really meaningful beyond the fact that it crashes.

Quote
I'm now looking at the PAK tools/utilities you made available on your site to understand the details of the AUXPRINT.PAK file. My assumption here is that as PIN imported the PPD with the specific control "codes" to put the printer in HQ1200 mode it either did not convert correctly because it did not know how to do it, or it failed to import altogether (although during the PPD import process no errors are generated).

You can use PPAKTOOL AUXPRINT.PAK /R (or /V) "<printer name>" to dump out the data for that printer as generated by PIN.  If it was imported without corruption, all the values should be shown as the PPD describes them.  If you see stuff that's completely weird (or garbled) then it's a good sign the imported data is corrupt.

You can also use the /P switch to recreate a PPD for the printer out of the PAK file. It won't be exactly the same as the original, but it should have a compatible subset of it. Comparing the two may be instructive (or may not)...
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 23, 2016, 01:08:06 pm
I made same test with the editor AE, and the printer Xerox 6500n in 600dpi with Linux ppd.
And you can see 2 files, one with the error but very more small only 145.789 bytes(this is the Have a Cigar.txt--warpon -- is 1.129.236bytes ) and other with only one line without intro 0d0a that is perfect.
Which shows the gsview , it is what gives the printer.
Saludos
Title: Re: Anyone successfully using Brother HL-5470dw?
Post by: roberto on February 23, 2016, 06:20:30 pm
More test and my conclusion:
I test with the Brother mfc2720dw with linux ppd, in 3 resolutions 300,600, and HQ1200 dpi, without problems with Courier Bold. Only in 2400x600 that is HQ1200 the text is more large that  width.
The ae.exe editor with courier new have a bug (i am not sure but i think that)

The windows ppd are generic, or incomplete. Why?, In the brother mfc2720dw the windows ppd HQ,is 1200x1200, in linux is 2400x600. If in linux work ok in all resolutions,the linux config is right.
In the xerox6500n, the windows ppd, do not have any about security, user, passw, etc. but in linux ppd that is complete especific for this printer. And work ok.

Saludos