Jump to content

Using php to generate an RTF file but having a footer


Superted

Recommended Posts

Hello,

 

Please excuse my 'newb'-ness, i have attempted to search these forums but searching the string "rtf" doesn't bring up much apart from a lot of people writing the word portfoilo. I have also spent many hours googling and not come up with anything which fully works...yet.

 

Basically what I'm attempting to do, using php is generate a word document which contains varibles which are populated by a MySQL database.

I've tried a number of ways thus far but the below method has been the closest.

 

The word document is basically a letter with a picture at the top, then the addresses, then a mini introduction, a small table and then the end signature.

I've acomplished this using;

header("Content-disposition: attachment; filename=letter.doc");

Then writing the 'letter' in html with all the < b>'s and < u>'s and a couple < hr>'s

 

So, so far so good. All is well, the only thing which i haven't been able to do is populate the footer of the document. This being the very bottom of each page when the document is printed. I want to enter an address into the footer but i'm unable to faverm out how this can be done using the doc content-disposition method.

 

Thankyou for any advice given.

I can post snippets of my current code if anyone requires it.

 

Kind regards

Superted

 

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.