Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Knowledge and How-To (https://thetfp.com/tfp/tilted-knowledge-how/)
-   -   Creating .doc and .pdf from php (https://thetfp.com/tfp/tilted-knowledge-how/128733-creating-doc-pdf-php.html)

Herk 12-11-2007 01:57 PM

Creating .doc and .pdf from php
 
Okay, so what I am doing is just writing a php script so that a work partner of mine can quickly generate quotes. I've already determined how to handle all of the information. What I am having trouble determining is what to do with it. It should come out in a nice, presentable document. I know the most basic of how to create pdf's using php, but I don't know the optimal route for this, or how to create a word doc at all.

What I want to know is how do I make a working option to output the quote on either word or pdf format.

Thanks.

Hain 12-11-2007 02:28 PM

I know jack diddly about PHP and creating PDF... other than I must submit all documents as PDFs.

A good friend taught himself PHP from here... and can do damned near anything -
http://www.php.net/manual/en/index.php

And this is where I get my PDF creator -
http://sourceforge.net/projects/pdfcreator/

Sorry I can't help more, it is outside my field.

ratbastid 12-11-2007 07:52 PM

There's a very nice PHP interface to PDFlib. See http://www.php.net/pdf . Once you've got that going, it's just some trial and error to get the layout to be acceptable.

Little secret: if you generate HTML, put a .doc extension on it, and send it down with the MIME type "application/msword", it'll open just great in recent enough versions of Word. It won't load external images, but it'll do anything you can do in HTML.

Herk 12-12-2007 09:35 AM

Quote:

Originally Posted by ratbastid
Little secret: if you generate HTML, put a .doc extension on it, and send it down with the MIME type "application/msword", it'll open just great in recent enough versions of Word. It won't load external images, but it'll do anything you can do in HTML.

Wow, that's great. Thanks for your responses.


All times are GMT -8. The time now is 06:58 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76