VeryPDF Cloud API Examples

Cloud PDF Processing APIs

Cloud HTML to PDF Converter APIs

Cloud HTML to Image Converter APIs

Cloud Image Format Converter and Image Processing APIs!

Cloud Office Document Formats to PDF and Image Converter APIs

[ERROR] Please provide a valid APIKEY.

If you have not a APIKEY, please sign up an account on "" site, you will get a valid APIKEY at "" 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  "".

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);
    return $data;

//The Usage
$returned_content = get_data('');
echo $returned_content;

curl Example for VeryPDF Cloud API:

curl ''
curl --request GET ''

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()

        private void button1_Click(object sender, EventArgs e)
            string url = "";
            WebRequest request = HttpWebRequest.Create(url);
            WebResponse response = request.GetResponse();
            StreamReader reader = new StreamReader(response.GetResponseStream());
            string urlText = reader.ReadToEnd();

VB.NET Example for VeryPDF Cloud API:

Imports System.IO
Imports System.Net

Module Module1
    Sub Main()
        'Address of URL
        Dim URL As String = ""
        ' 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
            str = reader.ReadLine()
    End Sub
End Module

Java Example for VeryPDF Cloud API:

public class VeryPDFCloudAPI
    public static void main(String[] args) throws Exception
        System.out.println("[Message] Enter main application...");
        String strOutFile = "verypdf.jpg";
        String strCloudAPIURL = "" + strOutFile;
        VeryPDFCloudAPIConverter(strCloudAPIURL, strOutFile);
        strOutFile = "verypdf.pdf";
        strCloudAPIURL = "" + strOutFile;
        VeryPDFCloudAPIConverter(strCloudAPIURL, strOutFile);
    public static void VeryPDFCloudAPIConverter(String strCloudAPIURL, String strOutFile) throws Exception
        String strResults = doHttpUrlConnectionAction(strCloudAPIURL);
        strResults = strResults.replace("[Output]", "");
        strResults = strResults.replace("<br>", "");
        strResults = strResults.replace(" ", "");
        System.out.println("[CloudAPI Return] " + strResults);
        File file = new File(".");
        String strLocalFile = file.getCanonicalPath()+"\\"+strOutFile;
        DownloadFileFromURL(strResults, strLocalFile);
    public static void DownloadFileFromURL(String strFileURL, String destinationFile) throws IOException
        System.out.println("[From] "+strFileURL);
        System.out.println("[To] "+destinationFile);

        URL url = new URL(strFileURL);
        InputStream is = url.openStream();
        OutputStream os = new FileOutputStream(destinationFile);
        byte[] b = new byte[2048];
        int length;
        while ((length = != -1) {
            os.write(b, 0, length);
    private static String doHttpUrlConnectionAction(String desiredUrl) throws Exception
        System.out.println("[CloudAPI URL] " + desiredUrl);
        URL url = null;
        BufferedReader reader = null;
        StringBuffer stringBuffer;
            // create the HttpURLConnection
            url = new URL(desiredUrl);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();

            // just want to do an HTTP GET here
            // uncomment this if you want to write output to this url
            // give it 15 seconds to respond
            // read the output from the server
            reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
            stringBuffer = new StringBuffer();
            String line = null;
            while ((line = reader.readLine()) != null)
                stringBuffer.append(line + "\n");
            return stringBuffer.toString();
        catch (Exception e)
            throw e;
            // close the reader; this can throw an exception too, so
            // wrap it in another try/catch block.
            if (reader != null)
                catch (IOException ioe)

VeryPDF Cloud API Platform Home Page

VeryPDF Cloud API Archives

If you have any question for VeryPDF Cloud API Platform, please feel free contact us,