Jump to content

contect type for txt file


AV1611

Recommended Posts

Sigh...

 

I've wasted too much time. I admit it. I can't figure this out.

 

I have a simple project.  I want to fill out a webform and when you click submit, it pushes a dynamic file to the user for download.

 

I almost have it working... but...

 

If I use content-type: application/msword doc

 

then if you use OO.O (as I do) it works great, but in M$ Word, it asks user to convert format.  NO GOOD.

If you use

content-type: plain/txt

 

then it is a mime type and the browser just displays the file.

 

How can I make the submit either a txt or doc file ( I really don't wanna make a pdf but that's really what it should be ) that simply downloads?  Is there a way to make the headers download rather than display as a mime type file?

Link to comment
Share on other sites

I really need to find a solution for php/pdf.  I just haven't spent the time to research it.

 

I settled on RTF.

 

It seems to behave in M$ and Linux ok and give some formatting that .txt doesn't.

 

(It doesn't do pictures at all does it?)

 

Does anyone see any issues with using RTF?  It's not gonna deprecate any time soon I don't think.

 

This is a good link of how to format RFT

 

http://www.biblioscape.com/rtf15_spec.htm

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.