Jump to content

Convert to PDF


SkyRanger

Recommended Posts

There is a really cool PDF class www.fpdf.org which will create a pdf for you.  Not sure about how you would convert a Word document but converting a plain text file should be easy enough.  Simply read the data from the textfile into a variable and output this in your PDF document.  As for PDF conversion you may need to install PDFLIB on your server which if like me you are on a managed server, this simply wont be allowed.  My hosting company informed me that the install would affect the whole server and also the cost of the license would be too expensive. 

 

As I said before www.fpdf.org may help you and is really well documented with example code and tutorials.  Not sure if this really answers your question however.

 

Thanks

 

Steve (Blackpool)

Link to comment
https://forums.phpfreaks.com/topic/51412-convert-to-pdf/#findComment-253200
Share on other sites

1. couple things I can think of.  I know that there are many good free available HTML to PDF converters. If they are submitting, .doc files, I know that WORD can save files as HTML. Perhaps have the person save them in webpage format, then you can convert them more easily.

I have used, and am quite familiar with  http://www.tufat.com/s_html2ps_html2pdf.htm, so if you decide to go that route then I could provide assistance.

 

2. Another idea, I don't have as much familiarity with is, I know there are PDF distillers, where they can convert documents, however sometimes they requires the file to be converted into .ps before they can convert to .pdf  and as well they most likely require licensing.  But what would be done is when the user uploads the file, you would move it into the /in/ folder for the distiller, then there is an /out/ folder which would have the converted pdf files. Mind you I have no experience with this, so use this information at your own whim.

 

3.  On a third note a quick search yielded  http://www.wynia.org/wordpress/word-to-pdf-converter-in-php-word2pdf/. Looks like it could be really easy, just need the server to be on a windows machine I think, with Openoffice Installed of course. Again I have no experience with this but you could research it some more.

Link to comment
https://forums.phpfreaks.com/topic/51412-convert-to-pdf/#findComment-253265
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.