Home > Mobile >  Firefox silent-printing with PrintJS prints blank pages
Firefox silent-printing with PrintJS prints blank pages

Time:10-19

I am trying to print a pdf blob using printJS without dialog to the default printer using Angular. It works well on Edge and Chrome, however I can't get Firefox to work.

The code I'm using:

const blob = new Blob([value], {type: 'application/pdf'});
      const url = window.URL.createObjectURL(blob);
      printJS({printable: url, type: 'pdf'});

I had it working by setting print.always_print_silent = TRUE, print.more-settings.open = TRUE and print.print_page_delay = 200.

After reinstalling Firefox and trying the same settings, the delay value resets to 50 after printing each time.

What could be the cause of that?

CodePudding user response:

I found out that you first need to print the same thing without using silent-printing to save its' options. Afterwards you can set print.always_print_silent = TRUE in about:config and it works.

CodePudding user response:

There are some problem in Firefox with the print function.

I've just tryed with version 93.0 64bit on Windows 10 and I can't print.

Try to print this page (stackoverflow.com) with Firefox, if you can't see the preview, maybe the problem is not your's.

  • Related