SkyRanger Posted May 15, 2007 Share Posted May 15, 2007 I am trying to figure out how to create a script so that my members can upload a file .doc,.txt,.fdr etc and be able to convert it to PDF I downloaded class.ezpdf and class.pdf but there are very little instruction on how to use it. Any help would be greatly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/51412-convert-to-pdf/ Share on other sites More sharing options...
stevesimo Posted May 15, 2007 Share Posted May 15, 2007 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) Quote Link to comment https://forums.phpfreaks.com/topic/51412-convert-to-pdf/#findComment-253200 Share on other sites More sharing options...
SkyRanger Posted May 15, 2007 Author Share Posted May 15, 2007 Yeah, but unfortionatly, I need it more for converting .doc and .fdr extensions. And I am totally lost on where to even begin with this. Quote Link to comment https://forums.phpfreaks.com/topic/51412-convert-to-pdf/#findComment-253239 Share on other sites More sharing options...
marf Posted May 15, 2007 Share Posted May 15, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/51412-convert-to-pdf/#findComment-253265 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.