I am showing pdf inside html using:
<embed id="print" src="file.pdf" type="application/pdf" width="100%" height="100%">
I would like to create a button that prints this file.
I thought it would be something like this; but it does not work.
<button onClick="javascript:document.getElementById('print').print();">
Does anyone know how I can call the print function in an embedded file?
source
share