Convert PDF Files to HTML or SVG Using Ruby

BuildVu Converts PDF files to HTML5 or SVG

What is BuildVu

BuildVu is a tool for developers looking to display documents inside their web or mobile based application or portal. By converting PDF documents to HTML or SVG, BuildVu provides a flexible solution which is simple and easy to integrate.

BuildVu also integrates with LibreOffice to provide a complete solution for converting PDF, Word, PowerPoint and Excel documents to HTML or SVG.

How does it work?

BuildVu is a Java application which runs directly from command line or can be deployed as a web-application via Docker or Java Application Server (such as Tomcat or Jetty). Deploying BuildVu as a web-application provides a REST API which allows you to convert documents from any language including Ruby.

BuildVu is available to license to run on your own servers, or alternatively we offer a monthly subscription to access our cloud server.

How to trial BuildVu using Ruby

Get started with the following steps:

  1. Sign up for the trial below to get your authentication token
  2. Ensure Ruby 2.0 (or higher) is installed
  3. Run the following command: gem install idr_cloud_client
  4. Copy/Paste the code on the right

The trial runs on the IDRsolutions cloud server and allows up to 20 conversions. Your files will be stored on our server for up to 1 hour.

<?php
require_once __DIR__ . "/PATH/TO/vendor/autoload.php";

use IDRsolutions\IDRCloudClient;

$endpoint = "https://cloud.idrsolutions.com/cloud/" . IDRCloudClient::INPUT_BUILDVU;
$parameters = array(
    'token' => 'YOUR_TRIAL_TOKEN', // Token provided to you via e-mail
    'input' => IDRCloudClient::INPUT_UPLOAD,
    'file' => 'path/to/file.pdf'
);

$results = IDRCloudClient::convert(array(
    'endpoint' => $endpoint,
    'parameters' => $parameters
));

IDRCloudClient::downloadOutput($results, 'path/to/outputDir');

echo $results['downloadUrl'];
require 'idr_cloud_client'

client = IDRCloudClient.new('https://cloud.idrsolutions.com/cloud/' + IDRCloudClient::BUILDVU)

conversion_results = client.convert(
    input: IDRCloudClient::UPLOAD,
    file: 'path/to/file.pdf',
    token: 'YOUR_TRIAL_TOKEN' # Token provided to you via e-mail
)

client.download_result(conversion_results, 'path/to/outputDir')

puts 'Converted: ' + conversion_results['downloadUrl']
using idrsolutions_csharp_client;
var client = new IDRCloudClient("https://cloud.idrsolutions.com/cloud/" + IDRCloudClient.BUILDVU);

try
{
    Dictionary<string, string> parameters = new Dictionary<string, string>
    {
        ["input"] = IDRCloudClient.UPLOAD,
        ["token"] = "YOUR_TRIAL_TOKEN", // Token provided to you via e-mail
        ["file"] = "path/to/file.pdf"
    };

    Dictionary<string, string> conversionResults = client.Convert(parameters);

    client.DownloadResult(conversionResults, "path/to/outputDir");

    Console.WriteLine("Converted: " + conversionResults["downloadUrl"]);
}
catch (Exception e)
{
    Console.WriteLine("File conversion failed: " + e.Message);
}
var idrcloudclient = require('@idrsolutions/idrcloudclient');

idrcloudclient.convert({
    endpoint: 'https://cloud.idrsolutions.com/cloud/' + idrcloudclient.BUILDVU,
    parameters: {
        input: idrcloudclient.UPLOAD,
        file: 'path/to/file.pdf',
        token: 'YOUR_TRIAL_TOKEN' // Token provided to you via e-mail
    },

    failure: function(e) {
        console.log(e);
    },
    progress: function() { },
    success: function(e) {
        console.log('Converted ' + e.downloadUrl);
    }
});
from IDRSolutions import IDRCloudClient

client = IDRCloudClient('https://cloud.idrsolutions.com/cloud/' + IDRCloudClient.BUILDVU)
try:
    result = client.convert(
        input=IDRCloudClient.UPLOAD,
        file='path/to/file.pdf',
        token='YOUR_TRIAL_TOKEN' # Token provided to you via e-mail
    )

    outputURL = result['downloadUrl']

    client.downloadResult(result, 'path/to/outputDir')

    if outputURL is not None:
        print("Download URL: " + outputURL)

except Exception as error:
    print(error)

Why run BuildVu from Ruby?

Simple

The REST API is easy to access from Ruby using our open source Ruby client and simple example code.

Flexible

Convert documents to static HTML5 or SVG which is easy to integrate into custom systems.

Easy

Subscribe to access our cloud server, or alternatively host your own server using our docker image.

Generate Your Free Trial Token

This is a 60-day free trial, no credit card required.


Not received an email? Check your spam. Click here if you still haven't received it