qzind / tray

Browser plugin for sending documents and raw commands to a printer or attached device.
https://qz.io
Other
837 stars 273 forks source link

HTML rotated elements print in poor quality #506

Open tresf opened 4 years ago

tresf commented 4 years ago

Quoting the mailing list...

Hi!

We've designed an HTML document containing rotated elements using the "transform: rotate()" css property. When printing via QZ, some of the rotated elements are being rendered in very low resolution, and the printed results are pixelated and blurry.

Is there any setting that could be causing or that could, instead, prevent this?

For context: we've had to do this to overcome an issue that we could not control duplex orientation via QZ, as it would default to the long-edge and we needed short-edge binding. So the back of each sheet was being printed upside down.


I'm onQZ Tray 2.1.0-RC7, Java RE 8 Update 221, Chrome 77.0.3865.90

We're trying to print on a RICOH 1107 EX printer, but tests with CutePDF Writer yield the same results, so the issue can be reproduced in virtual printers as well.

Printing settings passed to QZ are as follows:

qz.configs.create(printer, {
   margin: 0,
   density: "600",
   size: {width: 8.3, height: 11.7},
   units: 'in',
   colorType: 'grayscale',
   printerTray: "Tray 1",
   scaleContent: "false",
   duplex: "true",
   orientation: 'landscape',
   rasterize: "false",
   jobName: "printed_doc"

});

It's an A4 sheet.

I have attached the source HTML, a desired outcome manually printed on Chrome and CutePDF Writer and the same file printed with CutePDF Writer, but this time via QZ Tray. (removed)

Please let me know if there is any other information I can provide.


Okay, so I removed that version of JRE and installed AdoptOpenJDK 11's JRE, the results were largely the same. I have attached a sample. (removed)

Source HTML.html.zip

tresf commented 4 years ago

Since this issue is caused by JavaFX rotation, I've filed it on our tracker as an upstream bug, despite there being no upstream bug report. That said, if we can find a workaround, we may switch the classification to wontfix.

Upstream bug report warning As a word of caution, QZ pays for Java support, but that does NOT include JavaFX support, so at time of writing this, upstream JavaFX bugs have no contract in place with QZ to be fixed. We will be looking to remedy JavaFX bug escalation in the coming months.