Such as I want to export the https://www.shiyanlou.com/courses/1/labs/1/document, it is lab building teaching documents, but in the view of teaching before the document is generally going to login, so I use wkhtmltopdf export this page, the export of website is actually the login screen, this question should be how to solve?
CodePudding user response:
I want to download page should be such aBut through the command line run wkhtmltopdf https://www.shiyanlou.com/courses/1/labs/1/document D: h.p df this instruction, the actual PDF file is
CodePudding user response:
Setting cookies to wkhtmltopdf before exportCodePudding user response:
After login to export the bai, no login don't go to any export page, messed up!CodePudding user response:
Blocked by login, fill in the browser's cookiesCodePudding user response:
Intercept is your page code to intercept him, to the login page to do some operation, can also be as the above said to add a cookie;Stick a my way:
The public function itemplan_pdf () {
$this - & gt; Do_login ();
$item_plan=new ItemPlan ();
Return $item_plan - & gt; The detail (input (" id "));
}