Print.js icon indicating copy to clipboard operation
Print.js copied to clipboard

Print PDFs not working (blank) in Firefox

Open Scilly-guy opened this issue 1 year ago • 25 comments

Whether I click a print.js button on my site (on localhost) or on the Print.js Crabbly page, if it is for a PDF I get the correct number of pages but they are blank. Works as expected with images (from Print.js homepage) or in Chrome with PDFs on my site. If I open the PDF in Firefox directly and send to print it works, so this seems limited to Print.js and Firefox. It worked a few weeks ago and I can't think what setting I have changed within the browser since then that may have caused it to stop so wanted to check if others were having the issue.

I am running Firefox 110.0 (64-bit) on Windows 10 Home v22H2 - build 19045.2604

Scilly-guy avatar Mar 01 '23 15:03 Scilly-guy

I have the same issue. It works fine in Chrome and Edge but doesn't work in Firefox (110.0.1 (64-bit) on Windows 11).

AlinaStanishevskaya avatar Mar 01 '23 16:03 AlinaStanishevskaya

We're also seeing the same issue, two different users on Windows 10, Firefox 110. Can confirm Mac Firefox is working as expected as well as Chrome and Edge.

We're on version 1.6.0, looking at downgrading until this is resolved.

FayP avatar Mar 01 '23 20:03 FayP

Thanks, good to know it isn't just me although I was half expecting someone to state an obvious fix.

Scilly-guy avatar Mar 01 '23 20:03 Scilly-guy

Looks like there's a fix waiting to be released https://github.com/crabbly/Print.js/commit/dec4b1e09d3fd4b5fab70a68f0bd3773426604e9

FayP avatar Mar 01 '23 21:03 FayP

Meanwhile, I published an updated version of this library with the latest changes from the master branch to npmjs: https://www.npmjs.com/package/print-js-updated

LukasKlement avatar Mar 05 '23 08:03 LukasKlement

It looks like it's been solved in this PR, but not released. Hoping that someone can get a release out soon 🙏

arical avatar Mar 06 '23 04:03 arical

@LukasKlement your release is missing dist files. import printjs from 'print-js-updated/src/index' works though.

if you don't want to use another release, install from git npm i "git+https://github.com/crabbly/Print.js.git#08d002d43a9c383cc26fedbae3c8a6f597666917" and use import printjs from 'print-js/src/index'

j2L4e avatar Mar 06 '23 10:03 j2L4e

@j2L4e my bad, I pushed a new version and tested it. It's working now.

LukasKlement avatar Mar 06 '23 12:03 LukasKlement

Seems like the PR is merged into main now but sadly npm didnt get an update...

ChrisMeye avatar Mar 12 '23 12:03 ChrisMeye

How can I include this fix in the print.min.js code? I have a PHP site that calls this file, and I'm unfamiliar with how to turn the updated source code into a new print.min.js.

redtailedhawk23 avatar Mar 14 '23 03:03 redtailedhawk23

Nevermind, I was able to manually add those few lines with some modifications to print.min.js.

redtailedhawk23 avatar Mar 15 '23 17:03 redtailedhawk23

@crabbly any news on when we can expect the fix for this to be released?

FayP avatar Mar 27 '23 19:03 FayP

@LukasKlement thank you for providing that patch. Hopefully @crabbly will provide an "official" patch for the issue 😄

rhonibaer avatar Mar 31 '23 09:03 rhonibaer

Anyone know the release date of the new version with this fix?

chewlim avatar Apr 18 '23 08:04 chewlim

I imagine that the PR was missing package.json modification to update the version.

cedricfortin avatar Apr 18 '23 14:04 cedricfortin

+1

honzahana avatar May 19 '23 07:05 honzahana

+1

ezzaffa88 avatar May 26 '23 14:05 ezzaffa88

Duplicate of #655 ?

cedx avatar May 30 '23 15:05 cedx

any updates on this?

Maddumage avatar Jun 15 '23 04:06 Maddumage

I have the same issue. It works fine in Chrome and Edge but doesn't work in Firefox (114.0.1 (64-bit) on Windows 10). anybody can u tell me its firefox issue or print.js

Mudassarali222 avatar Jun 19 '23 12:06 Mudassarali222

@Mudassarali222 issue in lib, for workaround check https://www.npmjs.com/package/print-js-updated

pumano avatar Jun 19 '23 12:06 pumano

@pumano Thanks, Its working but docs is not properly managed. I changed docs with proper implementation. My partner zsubzwary created a PR for properly manage docs.

Mudassarali222 avatar Jun 20 '23 09:06 Mudassarali222

Resolved using https://www.npmjs.com/package/print-js-updated

danilobreda avatar Sep 04 '23 21:09 danilobreda

System version win11 Browser version 119 Print PDF white screen problem

zhuzhumu avatar Nov 30 '23 08:11 zhuzhumu

@zhuzhumu chrome version 119 ?

Mudassarali222 avatar Dec 02 '23 16:12 Mudassarali222