Question:I have a lot of different sites written in PHP and more and more often clients ask me to create PDF of various lists, product descriptions and so on. I've been using some application and other PDF libraries but they are a pain to use and have a very limited functionality. Are there any services out there that'll let me generate a PDF file from a URL and let the user download the result? That would definitely save my day 🙂 Is there any solution on VeryPDF?
Answer: According to your needs, maybe you can have a free trial of this application: VeryPDF Office Document to PDF Converter Cloud API, by which you can convert various formats files through . And this free online application is cloud based, so you can call it from PHP code at any computer system without any limitation. When conversion finishes, there will be an URL of output PDF produced, by which the users can download the result easily. Please check more information of this software on homepage, in the following part, I will show you how to use this software.
Convertfrom various input files
- This software is cloud based application, so when run the conversion, you do not need to download any application. Simply open any browser at any computer system to run the conversion following the example of this URL:
When converting Doc of , please refer to the following URL:
The structure of the URL: the main website URL of website http://online.verypdf.com/api/: if you have API code, please input next to it or else there will be watermark on output; then please input the full URL of input doc file; at the end, please specify the output PDF name. By this method, you can convert doc of URL to PDF.
- Another example of converting Excel of URL to PDF:
This free online application can help you convert files of Word (DOC, DOCX), Excel (XLS, XLSX), PowerPoint (PPT, PPTX), RTF formats to PDF format. When you run the conversion, simply change the file format of input, then you can make it.
Run conversion of URL to PDF from PHP
- When you run the conversion from PHP code, please refer to the following code template:
/* gets the data from a URL */
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
$returned_content = get_data('http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=doc2any&infile=http://online.verypdf.com/examples/cloud-api/verypdf.pptx&outfile=out.pdf');
If you need to check more examples, please go to website and homepage. During the using, if you have any question, please contact us as soon as possible.