Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How do I convert a document file into pdf in php?

I dont want to use API just need the code for that can convert my doc file to pdf..

user-image
Question added by Faizan Ahmad , Software Engineer , cardekho.com
Date Posted: 2013/04/16
Hamzeh Abu Zakham
by Hamzeh Abu Zakham , Director of Software Development , bayt.com

You can use TCPDF class, it helps you to generate PDF documents from PHP script.
Take a look here: http://www.tcpdf.org/

Muhammad Majid Saleem
by Muhammad Majid Saleem , Senior PHP Developer / Project Manager , SwaamTech

I guess - You can create it using COM class.
Following would be the steps to do it: - Read .doc file using COM class http://www.php.net/manual/en/class.com.php - Write .doc content into new pdf file using your favorite PDF library.
- Rename and Save newly created file.
Important: COM class only works with Windows.

Bassam Al Omran
by Bassam Al Omran , Material Specialist , AL-HOTY COMPANY

I use online to convert to pdf it really useful

Sami Abu Hamam
by Sami Abu Hamam , Senior Full Stack , Vertex Gaming

I suggest to use PDF library like (TCPDF) to create PDF with arabic language .

 

More Questions Like This