codeprinter icon indicating copy to clipboard operation
codeprinter copied to clipboard

Add a button to natively download as PDF

Open niccolospa opened this issue 7 years ago • 2 comments

It would be very useful when using the web-site through iPad or iPhone

niccolospa avatar Apr 01 '19 13:04 niccolospa

This capability should already exist in most browsers. Chrome, for instance, allows you to change your printer to "Save as PDF" instead of a real printer. It looks like this capability already exists on the iOS Safari browser as well.

It looks like it may be possible to provide this functionality natively via JavaScript libraries without sending the user to the print dialog, i.e. just click a save icon and the PDF immediately starts downloading. However, that may be more work than it's worth since we already have the "Save as PDF" print dialog solution. This is definitely something that someone can look into though and I would consider merging if the solution wasn't hack-y.

jaredpetersen avatar Apr 01 '19 15:04 jaredpetersen

Thank you! I didn’t know that is was possible to do by simply using the iOS print prompt

niccolospa avatar Apr 01 '19 15:04 niccolospa