Click here to Skip to main content
15,312,747 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I need Print Preview in PDF Format Using PHP Script Like Google Chrome Print Preview
Posted

1 solution

You can embed an iframe in your php page pointing to Google Doc Viewer and specifying the PDF file you want to display. This is the code you should add to your page:

HTML
<iframe src="http://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>


Then you just need to set up your own document file to the "url" query string param and that's it!
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900