• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Print a webpage server side

allewreK

Active member
#1
Hello,

This question i not related to xenforo.

Is there a way to print a webpage (as firefox or chrome does), in pdf, but server side ? Because browsers are printing a page exactly as it's shown up to the visitor, with complex CSS stuff etc...

Best regards.
 
#3
Hello,

This question i not related to xenforo.

Is there a way to print a webpage (as firefox or chrome does), in pdf, but server side ? Because browsers are printing a page exactly as it's shown up to the visitor, with complex CSS stuff etc...

Best regards.
You can grab the page source. save it as html then user wkhtmltopdf to save the contents as PDF.

https://code.google.com/p/wkhtmltopdf/