PHP to PDF reader

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

PHP to PDF reader

Post by user___ »

Hi guys,
I am developing an application that must read .pdf files online(WITHOUT ANY PLUGINS). I have tried GhostScript but there is no a commandline .exe that can be executed from a php script. How can I create such an application.
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

PHP to PDF reader

Post by user___ »

Thank you for the immediate reply but I would like to ask you to give me some info or a link to such where I can see the functions that it supports.
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

What you want to do with the data inside the PDF file?
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

PHP to PDF reader

Post by user___ »

To convert it from pdf to simple html files.
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

PHP to PDF reader

Post by user___ »

I have tried the commands described in HTMLTOPDF specs but the only output is the list of the command it supports. What is the problem.
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

PHP to PDF reader

Post by user___ »

I converted the pdf but HTMLTOPDF needs GhostScript to convert the images and this is the problem that I mentioned in the very begining. I can not find a GhostScript command line tool. I have found one but it does not work. Can anyone help me?
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

You can use pdf2txt if the style isn't important: http://www.pdf2txt.com/download.htm

And I don't think that pdf2html needs gs (where you saw that pdf2html uses gs?)
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

PHP to PDF reader

Post by user___ »

When I converted a pdf file to html file by it displayed me an error :
Error: PDF version 1.6 -- xpdf supports version 1.5 (continuing anyway)
Page-1
'gswin32c' is not recognized as an internal or external command,
operable program or batch file.
Error: Failed to launch Ghostscript!
and did not convert any images from the pdf file. What is the problem?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You need Ghostscript installed.
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

If you need Ghostscript, install it from http://sourceforge.net/projects/ghostscript/
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

PHP to PDF reader

Post by user___ »

Thank you It works. I have done it. Now it converts everything as it is supposed to.
Post Reply