VeryPDF Cloud API Examples

Cloud PDF Processing APIs
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=pdftools&infile=https://dl.dropboxusercontent.com/u/5570462/verypdf-cloud-api/verypdf.pdf&-f=1&-l=1&outfile=out.jpg
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=pdftools&infile=https://dl.dropboxusercontent.com/u/5570462/verypdf-cloud-api/verypdf.pdf&-f=1&-l=1&outfile=out.png
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=pdftools&infile=https://dl.dropboxusercontent.com/u/5570462/verypdf-cloud-api/verypdf.pdf&outfile=out.png&-r=72
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=pdftools&infile=https://dl.dropboxusercontent.com/u/5570462/verypdf-cloud-api/verypdf.pdf&outfile=out.jpg&-width=100&-height=100
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=pdftools&infile=https://dl.dropboxusercontent.com/u/5570462/verypdf-cloud-api/verypdf.pdf&outfile=out.jpg

Cloud HTML to PDF Converter APIs
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=html2pdf&infile=http://www.verypdf.com&outfile=verypdf.pdf

Cloud HTML to Image Converter APIs
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=html2image&infile=http://www.verypdf.com&outfile=verypdf.jpg
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=html2image&infile=http://www.verypdf.com&outfile=verypdf.jpg&--width=300&--height=300
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=html2image&infile=http://www.verypdf.com&outfile=verypdf.png

Cloud Image Format Converter and Image Processing APIs
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=imageproc&infile=https://dl.dropboxusercontent.com/u/5570462/verypdf-cloud-api/verypdf.png&outfile=out.jpg&-resize=300x300!

Cloud Office Document Formats to PDF and Image Converter APIs
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=doc2any&infile=https://dl.dropboxusercontent.com/u/5570462/verypdf-cloud-api/verypdf.doc&outfile=verypdf.pdf
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=doc2any&infile=https://dl.dropboxusercontent.com/u/5570462/verypdf-cloud-api/verypdf.xls&in_ext=.xls&outfile=verypdf.pdf
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=doc2any&infile=https://dl.dropboxusercontent.com/u/5570462/verypdf-cloud-api/verypdf.ppt&outfile=out.pdf
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=doc2any&infile=https://dl.dropboxusercontent.com/u/5570462/verypdf-cloud-api/verypdf.docx&outfile=out.pdf
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=doc2any&infile=https://dl.dropboxusercontent.com/u/5570462/verypdf-cloud-api/verypdf.xlsx&outfile=out.pdf
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=doc2any&infile=https://dl.dropboxusercontent.com/u/5570462/verypdf-cloud-api/verypdf.pptx&outfile=out.pdf
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=doc2any&infile=https://dl.dropboxusercontent.com/u/5570462/verypdf-cloud-api/verypdf.rtf&outfile=out.pdf

[ERROR] Please provide a valid APIKEY.

If you have not a APIKEY, please sign up an account on "http://online.verypdf.com" site, you will get a valid APIKEY at "http://online.verypdf.com/wp-admin/accountinfo.php" page. If you do not provide a valid APIKEY, VeryPDF Cloud API will work at DEMO mode. If you need any assistance, please feel free contact us via VeryPDF Ticket System at  "http://support.verypdf.com".

Some Examples to call VeryPDF Cloud API:

PHP Example for VeryPDF Cloud API:

//The Code
/* gets the data from a URL */
function get_data($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);
    curl_close($ch);
    return $data;
}

//The Usage
$returned_content = get_data('http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=html2image&infile=http://www.verypdf.com&outfile=verypdf.jpg');
echo $returned_content;


curl Example for VeryPDF Cloud API:

curl 'http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=html2image&infile=http://www.verypdf.com&outfile=verypdf.jpg'
curl --request GET 'http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=html2image&infile=http://www.verypdf.com&outfile=verypdf.jpg'


C# Example for VeryPDF Cloud API:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.Serialization;
using System.Net;
using System.IO;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string url = "http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=html2image&infile=http://www.verypdf.com&outfile=verypdf.jpg";
            WebRequest request = HttpWebRequest.Create(url);
            WebResponse response = request.GetResponse();
            StreamReader reader = new StreamReader(response.GetResponseStream());
            string urlText = reader.ReadToEnd();
            MessageBox.Show(urlText);
        }
    }
}


VB.NET Example for VeryPDF Cloud API:

Imports System.IO
Imports System.Net

Module Module1
    Sub Main()
        'Address of URL
        Dim URL As String = "http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=html2image&infile=http://www.verypdf.com&outfile=verypdf.jpg"
        ' Get HTML data
        Dim client As WebClient = New WebClient()
        Dim data As Stream = client.OpenRead(URL)
        Dim reader As StreamReader = New StreamReader(data)
        Dim str As String = ""
        str = reader.ReadLine()
        Do While str <> Nothing
            Console.WriteLine(str)
            str = reader.ReadLine()
        Loop
    End Sub
End Module