Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!
|
|
#1 |
|
Registered User
Join Date: Apr 2005
Posts: 14
|
PHP code 2 convert .doc file into .pdf file
Hello Friends,
I need to convert the DOC (WordFile) in to PDF through PHP code in my web. According to requirement whenever the user upload the .Doc file code should convert that .Doc file into .PDF file at runtime. I have tried by using PDFLib and FPDF functions but when the .Doc file contains the images,tables etc. either FPDF or PdfLib being falied to generate PDF file I am using Linux-PHP-MySQL Technolgoies for development. I am expecting suggestions and help from expert friends who can help me out to achive this. Thanks! |
|
|
|
|
|
|
|
#2 |
|
Registered User
Join Date: Feb 2009
Posts: 1
|
There is a project called phpLiveDocx. It is a SOAP based service, completely free of charge and does EXACTLY what you want. For sample PHP5 code to convert a DOC to PDF using phpLiveDocx, take a look at this recent blog post:
http://www.phplivedocx.org/2009/02/0...to-pdf-in-php/ |
|
|
|
|
|
#3 |
|
Registered User
Join Date: Jul 2009
Posts: 11
|
cheap scrubs
PHP is the very best technologe for the webtechnology.
|
|
|
|
|
|
#4 |
|
Registered User
Join Date: Jul 2009
Location: Bangalore
Posts: 11
|
hai all,
please find the below code: $filename = 'document.doc'; // file to convert $format = 'pdf'; // format to which to convert $targetFilename = Converter::getFilename($filename, $format); printf('Converting %s to %s... ', $filename, $targetFilename); $targetDocument = Converter::convert($filename, $format); if (false !== $targetDocument) { file_put_contents($targetFilename, $targetDocument); print("DONE.\n"); } else { print("ERROR.\n"); } |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Misconceptions about PHP | joeboe | General Discussion | 4 | 08-08-2006 06:02 PM |
| Free Month, ASP 2.0, ASP 1.1, PHP 4.0, PHP 5.0, MSSQL | xhosts | Post your ad here | 0 | 11-28-2005 08:57 AM |
| The robots.txt file: Article Part 2- Optimization | Pannu | Search Engine Optimization | 0 | 05-24-2004 10:00 AM |
| The robots.txt file: Article Part 1 - Introduction | Pannu | Search Engine Optimization | 0 | 05-24-2004 09:54 AM |
| Newbie question: cannot get form action attribute to work with PHP file | Lauren | PHP / mySQL | 8 | 06-06-2002 07:08 AM |