printThis icon indicating copy to clipboard operation
printThis copied to clipboard

[bugfix] mobile printing

Open evanb2 opened this issue 6 years ago • 4 comments

Implements fixes suggested in these issues:

#193 #152

Let me know if you want these split into individual PRs.

evanb2 avatar Dec 18 '19 18:12 evanb2

Looks good. Do you mind separating out? I'm iffy on approving the hack only approach fully, but would like the PR for people to use.

My plan is to look at other methods over the holiday break.

jasonday avatar Dec 19 '19 02:12 jasonday

This fix appears to have Chrome on iOS printing the entire page rather than just the requested area.

I put together two test pages in Codepen:

base test PR 194 test

I've tested with Safari, Chrome, and Opera on an iPhone. Will test on an iPad later today and provide a matrix of results.

oculus42 avatar Dec 19 '19 08:12 oculus42

@oculus42 Yeah I noticed that as well but wasn't sure if it was a bug in the library or my application code/css.

evanb2 avatar Dec 19 '19 20:12 evanb2

@guptanisha The only issue this solves on iPad (or iPhone) + Chrome is that is successfully opens the Print dialog. There is still another bug in that is does not correctly select the iFrame content for printing. Instead you just get the entire content of the page.

evanb2 avatar Jan 22 '20 17:01 evanb2