You are here: Re: textarea fields --> export to ms word --> word is stretch « HTML « IT news, forums, messages
Re: textarea fields --> export to ms word --> word is stretch

Posted by Toby A Inkster on 03/02/07 17:45

Eric Layman wrote:

> With a click of a button, php is able to grab these fields and by using
> header(), convert the output to Ms Word doc.

The PHP header() function does no such thing -- it simply sends an HTTP
header. You might be able to use an HTTP header to convince a browser to
open a plain text file in Word, but the file is not really a Word file.

Similarly, I'd guess you could use the same trick to send an HTML file to
Word instead of sending a plain text file. So just add a few HTML tags
into your output and Word's heuristics ought to auto-detect that it's
HTML, and do line wrapping.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация