In mobile Safari (I am testing on iOS 10.3.1) only the first page of a multi page Pdf gets printed.
Any idea how to fix this?
Not really. I would have to run a test. Have you tried to print the pdf directly without using the library?
@crabbly here is the print screen when I directly open http://printjs.crabbly.com/docs/large_printjs.pdf and use native iOS print option - 3 pages:

and here of I print the same Pdf via print.js - 1 page:

That's a new one. Somehow Safari mobile is not rendering the pdf properly when loaded with the library. I'll take a look into this.
I also asked the same question here http://stackoverflow.com/questions/43587792/force-print-dialog-in-mobile-safari-for-multi-page-pdf
Ran into exactly the same issue, would be great if someone could find a solution for this one.
I also notice that PDF's (single page and multi-page) are scaled down a bit in size. (e.g. text that should be at the bottom of the page, is printed at about 3/4 of the page)
And, should it help you finding a solution: The URL of the page I'm currently on is printed at the bottom of the page (not the URL of the PDF I'm printing), along with the page number.
This is still an issue with safari mobile.
I think we should just identify the browser as "not supported" and force the pdf to be opened by IOS.
Thoughts?
Closing this in favor of #33. Keeping all browser compatibility issues under that ticket.
It seems like the iOS Safari print method takes the first page of the PDF, and handles it as if it were an HTML page, with the following behaviors:
This appears to be a Safari behavior for web-based printing, so there's nothing this library can do to work around it.
@crabbly
I have just encountered this error that you can only print the first page of multi-page PDFs. As you have closed this issue with #33 - should this one be resolved or is iOS Safari just not supported?
I was not sure, therefore I checked the large-pdf-sample on your website, but the same bug here...
Would be great, if you could give me a short hint. Thx!
That's correct. Safari mobile is currently not supported, unfortunately. We should update the browser support table on the documentation page, with mobile browsers.
Most helpful comment
Ran into exactly the same issue, would be great if someone could find a solution for this one.
I also notice that PDF's (single page and multi-page) are scaled down a bit in size. (e.g. text that should be at the bottom of the page, is printed at about 3/4 of the page)
And, should it help you finding a solution: The URL of the page I'm currently on is printed at the bottom of the page (not the URL of the PDF I'm printing), along with the page number.