I require to programatically convert HTML (created with CK Publisher) in to a.doc report. I possess an outdated RTF converter filled in PHP, however it isn’t functioning effectively.

I’m trying to find solutions either filled in PHP or a command-line system for linux/FreeBSD that I can easily conjure up.

I am generating documents with php in word and pdf format

I am actually utilizing headers to produce a document in word

Open up XML SDK using the “altChunk” procedure to “install” the HTML file right into the WordOpenXML Document “deal” at the called for “aim for” factor. When it’s opened in Word, word will certainly convert and incorporate the HTML in to the document. View, for instance: http://blogs.msdn.com/b/ericwhite/archive/2008/10/27/how-to-use-altchunk-for-document-assembly.aspx.

Your complication is most likely due to the truth that when you change the material kind to a Word document, the internet browser doesn’t provide it as HTML. My estimate is that you require to add a newline to the Word document if you want a line break. How to insert this line break?

Putting either of the following (where you really want a page break) will deal with MS Word 2000-2007 (as well as potentially with later variations):.

Choose making a Word document with a page rest – i.e. pair of pages. Save it as HTML as well as check out the produced code wherefore style + tag combo is working with all of them.

It’s really fairly quick and easy, once you obtain an emotion for it. Some other strategy would certainly involve automating words application user interface and also putting the HTML from the Clipboard or from a report, to ensure Word utilizes its inner HTML converter. Or even composing your personal HTML converter.

You will be scraping your head to figure out exactly how Microsoft plays with the standards to compel their personal requirements.

Thus adjust the service based upon which variation of Word you are using since such differences are actually consistently there certainly in Microsoft items. One similar issue is actually: Expectation 2003 makes use of the Internet Traveler engine to render HTML emails, while Outlook 2007 makes use of words making motor. HTML e-mail presenting along with right styles and fonts in Overview 2003 are going to not show appropriately in Outlook 2007.

I am actually composing a PHP request for a client that needs a pre-existing HTML page I have actually already created to be “transported” as an Word data.

Anyways, my concern is actually, in spite of just how complicated this HTML page really is, it actually moves pretty well to a well formatted Word documents just by altering the content-type. The only complication I am actually having is actually that brand-new line rests (HTML <br> tags) may not be formatting correctly.

Looking for a remedy where I can easily create a MS Word document dynamically with the device readable data (HTML).

MS Word Template document + HTML file = Result Word document.

This html/css is actually functioning great for the pdf result yet not the word.

Know that Word 2000 designing might be different coming from Word 2003 – which might be various from Word 2007 once again – which might be various coming from Word 2010 again.

Can easily an individual advise an alternative strategy to develop page breaks that might work in word.

I have actually likewise tried bring in a basic document and Word, saving it as an HTML file as well as taking a look at the produced (i.e mediocre) Word HTML source. There is actually some CSS in there that I presumed might give me an idea, however I tried whatever as well as absolutely nothing seemed to function effectively. Word seems to be to incorporate an ‘MsoNormal’ lesson to wrapped paragraphs, I made an effort including this however it merely removes any kind of font style format I had and also doesn’t help.

Of what it costs, the Word file isn’t being rendered in the internet browser. Shifting the content-type pressures the HTML file to become made in Microsoft Word itself (Open/Save As discussions appears), which leads me to think it should not possess anything to perform along with the internet browser leaving?

Leave a Reply

Your email address will not be published. Required fields are marked *