amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Allow for Printing of AMP Page

Open jessanastasio opened this issue 9 years ago • 6 comments

Having support for an amp-print component that triggers window.print(); would be extremely useful. (this may not seem useful for mobile, but for sites that are entirely AMP the print button would be great for desktop)

jessanastasio avatar Jun 29 '17 15:06 jessanastasio

Sounds good to me. We may expose this as an action (AMP.print()) instead of a new component however.

aghassemi avatar Jun 29 '17 16:06 aghassemi

awesome!!

jessanastasio avatar Jun 29 '17 16:06 jessanastasio

hi @jessanastasio; @aghassemi mentioned that you were thinking about taking on this issue; thanks! I've invited you to join the AMP Project on GitHub; once you accept that we can assign this issue to you.

Let us know if you need any help getting started.

mrjoro avatar Jul 07 '17 17:07 mrjoro

thanks @mrjoro! just accepted the invite and forked the project - you can go ahead and assign the issue to me 👍

jessanastasio avatar Jul 07 '17 17:07 jessanastasio

Closed by #10319

jridgewell avatar Jul 11 '17 18:07 jridgewell

I was looking into the PR and I think that onbeforeprint event should also be dealt with.

Using a print shortcut CTRL+P or clicking on a menu option File -> Print, you will print a page that has no lazy-loaded components (all amp-img tags are missing). Binding to an event that happens before the print itself, might allow the loading of lazy-loaded components.

Thanks for the feature.

SchnWalter avatar Jul 11 '17 22:07 SchnWalter