Opened 15 years ago

Closed 9 years ago

#6008 closed bug (fixed)

PCL5 printer driver prints with wrong margins, repeated text

Reported by: dru_ed Owned by: jackburton
Priority: normal Milestone: R1
Component: Printing Version: R1/alpha2
Keywords: PCL, PCL5, LaserJet Cc: ithamar
Blocked By: #6070 Blocking:
Platform: x86

Description

Printing text documents (see attached StyledEdit example) using PCL5 driver results in incorrect output.

Test was to print the first page of the sample document. "Print setup" had margins of 1 inch on each side. Paper size was Letter. Printed in Portrait mode.

See attached scan of resulting document for details of incorrect output: text was cut off on the left and right margins, in place of the page of text a single paragraph was repeated down the page, margins were incorrect.

Attachments (8)

taleprintout.png (43.6 KB ) - added by dru_ed 15 years ago.
scan of actual printed document
Tale.zip (25.0 KB ) - added by dru_ed 15 years ago.
StyledEdit test document & PDF output via "print to pdf"
bepdfprint.png (15.0 KB ) - added by dru_ed 15 years ago.
Scan of printout BePDF Documentionat pg 17 of 36, "Printing"
printjob.zip (185.6 KB ) - added by dru_ed 15 years ago.
print job file, pcl5 driver, bepdf manual page 17
37006printing.png (21.4 KB ) - added by dru_ed 15 years ago.
Print sample, BePDF actual page 17 on Haiku 37006 nightly.
Aug1HaikuPrintingWeb.png (62.9 KB ) - added by dru_ed 14 years ago.
Print Sample Haiku 37825
Aug1MacPrintingWeb.png (159.9 KB ) - added by dru_ed 14 years ago.
Sample PDF printout on Mac OS X for comparison
PrintJob Setup.png (36.9 KB ) - added by laplace 14 years ago.
Gamma and Ink Usage in PrintJob Setup Dialog

Download all attachments as: .zip

Change History (42)

by dru_ed, 15 years ago

Attachment: taleprintout.png added

scan of actual printed document

by dru_ed, 15 years ago

Attachment: Tale.zip added

StyledEdit test document & PDF output via "print to pdf"

comment:1 by laplace, 15 years ago

It is interesting that even in the PDF version the text to the right gets truncated. I haven't looked at the source code of StyledEdit, but I guess there is something wrong in the printing code.

You could try to print a page of the user guide in BePDF. If it works then StyleEdit must have a bug.

comment:2 by ithamar, 15 years ago

Indeed I suspect this is StyledEdit, I have seen similar problems with printing through the Postscript printer driver from StyledEdit.

by dru_ed, 15 years ago

Attachment: bepdfprint.png added

Scan of printout BePDF Documentionat pg 17 of 36, "Printing"

in reply to:  1 comment:3 by dru_ed, 15 years ago

Replying to laplace:

You could try to print a page of the user guide in BePDF. If it works then StyleEdit must have a bug.

It's not just StyledEdit. I tried to print page 17 of 36, "Printing," in the BePDF manual and got similar output: A top portion of the document was repeated down the page.

See attached scan of printed output (Filename: bepdfprint.png).

comment:4 by stippi, 15 years ago

I can confirm that with the IPP add-on. I was able to print to a printer (Canon IP4200) attached and published via a Mac Mini running OSX. I tried to print a page that had just "Test" once at the top, but Test repeated until the end of the page when it came out of the printer.

comment:5 by stippi, 15 years ago

Darn, forgot to mention I was using Pe to print.

comment:6 by phoudoin, 15 years ago

Does the repeated text is only on last page or each one? Does it works as expected with Preview and PDF Writer *printers*?

in reply to:  5 ; comment:7 by laplace, 15 years ago

Replying to stippi:

Darn, forgot to mention I was using Pe to print.

So the issue is not application specific. Damn! It is always easier to blame someone else :)

If no one beats me, I will investigate this on the weekend. If someone wants to look into it also in the mean time, my next guesses are that something is broken recording into a BPicture, archiving it or dearchiving from it. My next step would be to check if the contents of a print spool file is correct.

in reply to:  7 ; comment:8 by phoudoin, 15 years ago

So the issue is not application specific.

But could be driver specific. Hence my questions...

If someone wants to look into it also in the mean time, my next guesses are that something is broken recording into a BPicture, archiving it or dearchiving from it.

Or clipping & raster banding. But the repeated pattern seems to be BPicture bounded indeed. The picture position and rect could be corrupt too.

dru_ed, could you attach the job file or the dump from DumpPrintJob (see src/tests/kits/interface/pictureprint) on the same document?

by dru_ed, 15 years ago

Attachment: printjob.zip added

print job file, pcl5 driver, bepdf manual page 17

in reply to:  8 comment:9 by dru_ed, 15 years ago

Replying to phoudoin:

dru_ed, could you attach the job file or the dump from DumpPrintJob (see src/tests/kits/interface/pictureprint) on the same document?

I attached the job file. I noticed the "Letter" size page "Width" shows as "8.26 in" in BePDF's "Print Settings." It should be "8.50." "Height" is listed correctly as "11.00 in"

comment:10 by laplace, 15 years ago

Blocked By: 6070 added

Drawing a BPicture ignores the offset currently (see ticket #6070).

comment:11 by laplace, 15 years ago

Ticket #6070 is now closed and the repeated bands in the print output should not appear any more.

I don't know if this is a new issue. In "Preview" the clipping is not correct and the more you zoom into the page the fewer output is shown, until nothing can be seen.

by dru_ed, 15 years ago

Attachment: 37006printing.png added

Print sample, BePDF actual page 17 on Haiku 37006 nightly.

comment:12 by laplace, 15 years ago

Sorry for the late reply and thank you for the new print sample.

It looks like there are still issues drawing a BPicture. I will try to reproduce the problem in the test application mentioned in #6070 so that it can be fixed.

in reply to:  12 ; comment:13 by jackburton, 14 years ago

Replying to laplace:

Sorry for the late reply and thank you for the new print sample.

It looks like there are still issues drawing a BPicture. I will try to reproduce the problem in the test application mentioned in #6070 so that it can be fixed.

If you manage to create a reproducible test I can very well have a look.

in reply to:  13 comment:14 by laplace, 14 years ago

Replying to jackburton:

I will do when time permits.

in reply to:  13 comment:15 by laplace, 14 years ago

Replying to jackburton:

It looks like there are still issues drawing a BPicture. I will try to reproduce the problem in the test application mentioned in #6070 so that it can be fixed.

If you manage to create a reproducible test I can very well have a look.

It turned out, that when the picture is drawn with an offset and the scale factor is not 1, the scaled drawing offset is not taken into account.

See hrev37818 "Test Draw Scaled Picture" in the result you should see a 16x16 filled rectangle at the left top (which is shown) and at the middle top a 8x8 filled rectangle (which is shown at the right top right now).

comment:16 by jackburton, 14 years ago

I think I can have a look at this, Michael, unless you absolutely want to fix it yourself.

in reply to:  16 comment:17 by laplace, 14 years ago

Replying to jackburton:

I think I can have a look at this, Michael, unless you absolutely want to fix it yourself.

I would prefer not to look into this :) because I would have to study the appropriate source code first.

comment:18 by jackburton, 14 years ago

Owner: changed from laplace to jackburton
Status: newin-progress

comment:19 by jackburton, 14 years ago

The test case is fixed in hrev37824. Please verify if this fixes also the printing problem, and close the ticket in that case.

in reply to:  19 comment:20 by laplace, 14 years ago

Replying to jackburton:

The test case is fixed in hrev37824. Please verify if this fixes also the printing problem, and close the ticket in that case.

I hope dru_ed is still motivated to verify that.

However this change broke rendering of BPictureButton see ticket #6415.

Last edited 14 years ago by laplace (previous) (diff)

by dru_ed, 14 years ago

Attachment: Aug1HaikuPrintingWeb.png added

Print Sample Haiku 37825

by dru_ed, 14 years ago

Attachment: Aug1MacPrintingWeb.png added

Sample PDF printout on Mac OS X for comparison

comment:21 by dru_ed, 14 years ago

I print sample, BePDF Help actual page 17, on 37825. Only half the page prints.

Output is also very pale again. See attachment "Aug1HaikuPrintingWeb.png" for scan of actual printed output.

The printer continues to print the job over and over because the spool does not get deleted after printing.

Also, as in comment 9: "Letter" size page "Width" shows as "8.26 in" in "Print Settings." It should be "8.50." "Height" is listed correctly as "11.00 in"

For comparison purposes I printed the same page on Mac OS X via CUPS; see attachment "Aug1MacPrintingWeb.png."

by laplace, 14 years ago

Attachment: PrintJob Setup.png added

Gamma and Ink Usage in PrintJob Setup Dialog

in reply to:  21 comment:22 by laplace, 14 years ago

Replying to dru_ed:

Thanks for testing!

I print sample, BePDF Help actual page 17, on 37825. Only half the page prints.

Could you try it again with the patch attached to ticket #6415?

Output is also very pale again. See attachment "Aug1HaikuPrintingWeb.png" for scan of actual printed output.

The brightness can be controlled with the Gamma and Ink Usage sliders: Gamma and Ink Usage in PrintJob Setup Dialog

The printer continues to print the job over and over because the spool does not get deleted after printing:

Also, as in comment 9: "Letter" size page "Width" shows as "8.26 in" in "Print Settings." It should be "8.50." "Height" is listed correctly as "11.00 in"

I will look into these 2 points later.

in reply to:  21 comment:23 by laplace, 14 years ago

Replying to dru_ed:

Also, as in comment 9: "Letter" size page "Width" shows as "8.26 in" in "Print Settings." It should be "8.50." "Height" is listed correctly as "11.00 in"

BePDF shows the size of a page as stored in the PDF file. Its purpose is so that a user can adjust the zoom factor to print the document in different page size than the one it was generated for (for example Letter on A4 or vice versa).

So that size shown there is probably correct unless you know the PDF file was generated with exact Letter size.

in reply to:  21 comment:24 by laplace, 14 years ago

Replying to dru_ed:

The printer continues to print the job over and over because the spool does not get deleted after printing.

This should not happen. If an error occurs during printing the document should not be printing automatically again. I am not certain what exactly causes the problem.

What transport protocol do you use (USB)?

I have printed the "Tale" document using StyledEdit to a file and the print job file gets deleted afterwards. Does the print job file get deleted when you print to a file instead?

PS: Sorry that I spelled your name wrong. BTW is there a way to get the real name or email address from a trac account? I always have difficulties to associate a nick name with it.

comment:25 by dru_ed, 14 years ago

I'm using USB for transport protocol. The spool file is correctly deleted if I printing a file instead.

Regarding "Print Settings" sizes, I tested another document that was created at 8.5 x 11 and it showed correctly so it works as designed, rather than as expected.

Tested device is a laser printer, I'll experiment with "ink" and "gamma" settings.

I haven't had a chance to build Haiku with the patch at ticket #6415 yet.

in reply to:  25 comment:26 by laplace, 14 years ago

Replying to dru_ed:

I haven't had a chance to build Haiku with the patch at ticket #6415 yet.

I have applied the patch in hrev37939. Can you please test again?

comment:27 by dru_ed, 14 years ago

Hi. I tested hrev37948. A full page prints now from BePDF. The spool file is not deleted and continues to print to the printer until manually removed as before. Manual removal may crash the print server requiring a restart.

Testing further, I see 2-Up, that is 2 pages printed in a reduced size on 1 sheet of paper prints incorrectly. They should be rotated 90 degrees. Currently they print the correct size but the 2nd page prints half off the right side.

4-Up works, although the pages are printed in an odd order for left-to-right reader. Instead of a top row of pages 1 & 2, and bottom row of pages 3 & 4, Haiku prints 1 & 3 on top with 2 & 4 on the bottom row.

I will note, by comparison, Mac OS X offers four options of layout direction with top row: 1, 2 & bottom row: 3, 4, as default.

A gamma of 1.0 and 50% "ink" is suitably dark for the laser.

in reply to:  27 ; comment:28 by laplace, 14 years ago

Replying to dru_ed:

Thanks I will look into the remaining problems after my vacation (about August, 20th).

comment:29 by laplace, 14 years ago

Cc: ithamar added

comment:30 by laplace, 14 years ago

Ithamar if you have time, could you check if the USB transport add-on is the culprit.

in reply to:  28 comment:31 by laplace, 14 years ago

Replying to laplace:

Thanks I will look into the remaining problems after my vacation (about August, 20th).

Sorry for the wrong promises. My printers at home are not Haiku compatible. Right now I am creating a Gutenprint based printer driver for Haiku, so I can print to (only) one of my printers and then should be able to reproduce the USB problem.

in reply to:  30 comment:32 by laplace, 14 years ago

Replying to laplace:

Ithamar if you have time, could you check if the USB transport add-on is the culprit.

Indeed it was the culprit. This particular problem is fixed in hrev38915. The USBPrintRoster thread has to be stopped before unloading the add-on.

comment:33 by jackburton, 12 years ago

Can we close this ticket ?

comment:34 by jackburton, 9 years ago

Resolution: fixed
Status: in-progressclosed

Fixed in hrev38915.

Note: See TracTickets for help on using tickets.