Is there any way to convert a DOCX or DOC file to TIFF format in PHP?
Asked
Active
Viewed 1,077 times
2
-
what have you done for that? – Tharif Apr 13 '15 at 05:35
-
Check this answer, it might help you: http://stackoverflow.com/a/29078309/1974224 – Cristik Apr 13 '15 at 05:37
-
1I use /usr/bin/wvPDF to first convert docx file to pdf format and after pdf file to TIFF format using ghost script "gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=tiffg3 -sOutputFile=" – user3406089 Apr 13 '15 at 06:45
-
http://www.coolutils.com/Online/Doc-Converter/ – Zelldon Apr 13 '15 at 06:49
1 Answers
1
Ghostscript doesn't accept doc or docx as an input, it only accepts PostScript or PDF. SO in order to render other formats to TIFF you first need to convert them into either PostScript ro PDF.
Open them in OpenOffice or LibreOffice and export as PDF, or print to a PostScript file.
Then you can render the PDF or PostScript to TIFF.

KenS
- 30,202
- 3
- 34
- 51
-
Hi KenS, Thank you for your rply. Can you provide me PHP code to convert doc file to pdf format ?. – user3406089 Apr 13 '15 at 09:59
-
No, I don't speak PHP. As I said, your best bet is to use something like OpenOffice or LibreOffice which does the job directly, Or one of the suggestions in the comments above. You say yourself that you are converting the the cod file to PDF using '/usr/bin/wPDF'. – KenS Apr 13 '15 at 10:11