I want to export the page to a .doc file, but when I open the generated .doc, it opens in the weblayout view instead of print-view. This is ugly and confusing. Is there any way to set it to print?
script I use to create a document:
<?php if(isset($_GET['word'])) { header("Content-Type: application/vnd.ms-word"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("content-disposition: attachment;filename=test.doc"); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"> <title>Example</title> <style type="text/css"> </style> </head> <body> <h1>Hello StackOverflow!</h1> <p>Lorem ipsum...</p> </body> </html>
And now, when I'm here, can I add checkbox words ☒ and word input fields?
source share