PHP Convert Html to Word Format


For change html code into word .doc file in PHP we can use “application/” header type.

header(“Content-type: application/”);
header(‘Content-Type: application/force-download; charset=UTF-8’);
header(‘Cache-Control: no-store, no-cache’);
header(‘Content-disposition: attachment; filename=”myword.doc”‘);

Then After this code u can add Your html or php code.
It will convert your html code into Doc file.



One response to “PHP Convert Html to Word Format

  1. This code is working but it doesn’t download any image and on changing the page view in word to print layout it become suffle what should i do now?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s