Friday, August 28, 2009

PDF to HTML Conversion.

Convert PDF to HTML. Boost your online proofreading business and add pdf as an automated format for your proofreading website.


INTRODUCTION



It was difficult to calculate or to convert any pdf document to html. It is quite easy approach to convert from html to pdf. Now it is also possible on both of the system to create html files from pdf with php.

Automation Process
You need to install an executable based on xpdf to accomplish this task.
Here is the url of the package: PDFTOHTML PACKAGE
After the installation of the package use the following command to execute it.

There are 2 ways or commands I will prefer.

You can also execute these commands from SSH or PHP script. We will focus at php script command execution.

Lets consider the installed files are present in /usr/bin.


  • system('/usr/bin/pdftohtml /var/www/website/processed/example.pdf') // This will create a HTML file in the processed folder.


  • system('/usr/bin/pdftohtml /var/www/website/processed/example.pdf -') // This command will not create an HTML file but it will show the output of the file at screen.


Few Common Errors

  1. BAD Color Error: This error usually appear if the package doesn't install properly.
  2. Execution Error: It is also a common error that php doesn't execute the command and output file doesn't generate. To solve this error you need to confirm few things.
    • Confirm php is not running in the safe mode.
    • You must execute the command as root. So you also need to set the apache securities.


No comments:

Post a Comment

All rights are reserved. Nobleatom.com
Software Development Services.
Contact me: khubabmazhar596@hotmail.com

Web Design Increase Page Rank Internet blogs DigNow.net web directory1Abc DirectorySeo friendly web directory