| | |
download pdf file, convert to html, in PHP since working in Linux
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2004
Posts: 14
Reputation:
Solved Threads: 1
Hello qadeer,
try to use the commands shell
$ pdftotext <file.pdf> <file.text>
this program come with the package xpdf.
or try directly:
$ convert <file.pdf> <file.html>
when I do the test the program convert in various html files with one gif file
see you,
fpepito
try to use the commands shell
$ pdftotext <file.pdf> <file.text>
this program come with the package xpdf.
or try directly:
$ convert <file.pdf> <file.html>
when I do the test the program convert in various html files with one gif file

see you,
fpepito
•
•
•
•
Originally Posted by qadeer
Dear Friends,,
i want to download a pdf file from any server since i have url of a pdf file then i convert it in html format. i am working in PHP and enviorment is linux.
Pleas help me for this script i am much upset due to this
With Best Regards
Qadeer Minhas
•
•
Join Date: Aug 2007
Posts: 3
Reputation:
Solved Threads: 0
If you want something windows based I think you can take the HTML to PDF converter library for .NET from http://www.dotnet-reporting.com or from http://www.winnovative-software.com. You can be build your own application or you can use the demo one.
All the conversion can be done in a few lines for C# code:
// Create the PDF converter. Optionally you can specify the virtual browser
// width as parameter. 1024 pixels is default, 0 means autodetect
PdfConverter pdfConverter = new PdfConverter();
// set the license key
pdfConverter.LicenseKey = "P38cBx6AWW7b9c81TjEGxnrazP+J7rOjs+9omJ3TUycauK+cLWdrITM5T59hdW5r";
// set the converter options
pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4;
pdfConverter.PdfDocumentOptions.PdfCompressionLevel = PdfCompressionLevel.Normal;
pdfConverter.PdfDocumentOptions.PdfPageOrientation = PDFPageOrientation.Portrait;
pdfConverter.PdfDocumentOptions.ShowHeader = false;
pdfConverter.PdfDocumentOptions.ShowFooter = false;
// set to generate selectable pdf or a pdf with embedded image
pdfConverter.PdfDocumentOptions.GenerateSelectablePdf = selectablePDF;
// Performs the conversion and get the pdf document bytes that you can further
// save to a file or send as a browser response
byte[] pdfBytes = pdfConverter.GetPdfFromUrlBytes(urlToConvert);
All the conversion can be done in a few lines for C# code:
// Create the PDF converter. Optionally you can specify the virtual browser
// width as parameter. 1024 pixels is default, 0 means autodetect
PdfConverter pdfConverter = new PdfConverter();
// set the license key
pdfConverter.LicenseKey = "P38cBx6AWW7b9c81TjEGxnrazP+J7rOjs+9omJ3TUycauK+cLWdrITM5T59hdW5r";
// set the converter options
pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4;
pdfConverter.PdfDocumentOptions.PdfCompressionLevel = PdfCompressionLevel.Normal;
pdfConverter.PdfDocumentOptions.PdfPageOrientation = PDFPageOrientation.Portrait;
pdfConverter.PdfDocumentOptions.ShowHeader = false;
pdfConverter.PdfDocumentOptions.ShowFooter = false;
// set to generate selectable pdf or a pdf with embedded image
pdfConverter.PdfDocumentOptions.GenerateSelectablePdf = selectablePDF;
// Performs the conversion and get the pdf document bytes that you can further
// save to a file or send as a browser response
byte[] pdfBytes = pdfConverter.GetPdfFromUrlBytes(urlToConvert);
•
•
Join Date: May 2005
Posts: 2
Reputation:
Solved Threads: 0
Here is a class used to convert HTML to PDF, but I'm not sure about the reverse:
http://www.phpclasses.org/browse/package/2905.html
http://www.phpclasses.org/browse/package/2905.html
![]() |
Similar Threads
- vb:error 424 object required while downloading file (a pdf file location) to app.path (VB.NET)
- Using VB Code - Silent download pdf from server and print to local printer (Visual Basic 4 / 5 / 6)
- .pdf file (Windows NT / 2000 / XP)
- Google map convert into an image using php (PHP)
- NEW PDF File creation issue using PHP (PHP)
Other Threads in the PHP Forum
- Previous Thread: Unexpected error that doesn't exist
- Next Thread: Word Press 2.2 users... mulitple installation of word press blog and login once...
| Thread Tools | Search this Thread |
# .htaccess 5.2.10 access alexa apache api array beginner broken cakephp checkbox class clean clients cms code convert cron curl database date directory display dissertation dropdown dynamic echo$_get[x]changingitintovariable... email encode error fairness file folder form forms function functions google hack href htaccess html htmlspecialchars image include indentedsubcategory ip javascript joomla legislation limit link local login mail memberships menu methods multiple multipletables mysql mysqlquery network newsletters oop open passwords paypal pdf persist php provider query radio random redirect remote script search secure server sessions simple sockets source space spam sql system table tutorial upload url user variable video voteup web youtube





