You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have built our own viewer upon the pdf.js library and I have experienced some issues regarding to print. Our viewer displays one or two pdf-pages based on the ratio of the window. Resize your browser window until you see a spread of the newspaper. For some reason the Firefox print functionallity doesn't like it when you resize the window so you may need to reload the page if the browser shows you a dialog saying something unexpected went wrong. But when you have the spread and try to print the pages the output is white pages. If you resize the window until only one page is visible (and then reload the page because Firefox breaks) the pdf get's printed but it get's cut at the bottom for some reason. Safari and Chrome is able to print the spread as well as a single page alright. I use the mozPrintCallback-shim from the pdfjs-viewer for those browsers.
Each page in the newspaper is a separate pdf document and I load the pages using the same worker. I have used the same pattern as in the pdfjs-viewer for setting up and rendering to a new canvas in a printContainer and using that for the print output.
I think the bug occurs during the render of the canvases when the mozPrintCallback method is invoked. If I put in some logs it seems that both canvases get's their mosPrintCallback method added to them but only one of them is invoked. I tried to use the polyfill in Firefox as well but that ended up in four white pages instead of two so that didn't seem to be the right way to go.
Configuration:
Web browser and its version: Firefox 47.0.1
Operating system and its version: OSX El Capitan 10.11.6
PDF.js version: 1.3.62#084bb86 (also tried the latest 1.5)
Is an extension: No
Steps to reproduce the problem:
Press the print-button in the GUI or cmd-p on your keyboard while viewing a spread.
Print or preview the pages.
What is the expected behavior?
Should print or preview the pdf-pages
I can not create the same scenario with the official viewer since it only loads one pdfDocument and our viewer loads two (or several) pdfDocuments. That is the main difference in the viewer. However I think the bug is in the pdf.js library as it handles the render requests that seems to fail in this case.
Closing as fixed after recent printing PRs. To reopen (if the problem remains with current master branch), please provide a new example based on that branch. Note that loading more than one PDF document per page is experimental and may not work correctly (see e.g., #7693).
We have built our own viewer upon the pdf.js library and I have experienced some issues regarding to print. Our viewer displays one or two pdf-pages based on the ratio of the window. Resize your browser window until you see a spread of the newspaper. For some reason the Firefox print functionallity doesn't like it when you resize the window so you may need to reload the page if the browser shows you a dialog saying something unexpected went wrong. But when you have the spread and try to print the pages the output is white pages. If you resize the window until only one page is visible (and then reload the page because Firefox breaks) the pdf get's printed but it get's cut at the bottom for some reason. Safari and Chrome is able to print the spread as well as a single page alright. I use the mozPrintCallback-shim from the pdfjs-viewer for those browsers.
Each page in the newspaper is a separate pdf document and I load the pages using the same worker. I have used the same pattern as in the pdfjs-viewer for setting up and rendering to a new canvas in a printContainer and using that for the print output.
I think the bug occurs during the render of the canvases when the mozPrintCallback method is invoked. If I put in some logs it seems that both canvases get's their mosPrintCallback method added to them but only one of them is invoked. I tried to use the polyfill in Firefox as well but that ended up in four white pages instead of two so that didn't seem to be the right way to go.
Configuration:
Steps to reproduce the problem:
What is the expected behavior?
Should print or preview the pdf-pages
What went wrong?
Prints or previews white pages
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): http://webapp.im-epaper.se/pdfjs/print-bug/#pages/10902/3/24
The text was updated successfully, but these errors were encountered: