Trial BuildVu in the Cloud
Your free trial is active for 60 days and allows 20 conversions. Your files will be stored on our server for up to 1 hour.
BuildVu is a Java application that can be run directly from command line or deployed to a Java Application Server such as Tomcat or Jetty on an on-premise or cloud server. Our cloud trial allows you to try BuildVu from other languages without needing to figure out server configuration or implementation specifics.
Trial BuildVu with JavaScript
Get started with the following steps:
- Try out the online demo
- View the JavaScript client on GitHub to learn more
Trial BuildVu with PHP
Get started with the following steps:
- Ensure PHP 5.6 (or higher) and composer is installed
- Run the following command:
composer require idrsolutions/idrsolutions-php-client
- Copy/Paste the code on the right
<?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)
// To add the client to your project use will need to add the file idrcloudclient.js to your project and include the following line to access it:
// <script src="path/to/idrcloudclient.js" type="text/javascript"></script>
var endpoint = 'https://cloud.idrsolutions.com/cloud/' + IDRCloudClient.BUILDVU;
var parameters = {
token: 'YOUR_TRIAL_TOKEN', // Token provided to you via e-mail
input: IDRCloudClient.UPLOAD,
file: 'path/to/exampleFile.pdf'
}
function progressListener(e) {
console.log(JSON.stringify(e));
}
function failureListener(e) {
console.log(e);
console.log('Failed!');
}
function successListener(e) {
console.log(JSON.stringify(e));
console.log('Download URL: ' + e.downloadUrl);
}
IDRCloudClient.convert({
endpoint: endpoint,
parameters: parameters,
// The below are the available listeners
progress: progressListener,
success: successListener,
failure: failureListener
});
import java.util.Map;
public final class ExampleUsage {
public static void main(final String[] args) {
final IDRCloudClient client = new IDRCloudClient("https://cloud.idrsolutions.com/cloud/" + IDRCloudClient.BUILDVU);
final HashMap<String, String> params = new HashMap<>();
params.put("token", "YOUR_TRIAL_TOKEN"); // Token provided to you via e-mail
params.put("input", IDRCloudClient.UPLOAD);
params.put("file", "path/to/file.pdf");
try {
final Map<String, String> results = client.convert(params);
System.out.println(" --------- ");
System.out.println(results.get("previewUrl"));
IDRCloudClient.downloadResults(results, "path/to/outputDir", "example");
} catch (final ClientException | InterruptedException e) {
e.printStackTrace();
}
}
}
import 'dart:io';
import 'package:http/http.dart' as http;
import 'package:http_parser/http_parser.dart';
import 'package:path/path.dart';
import 'dart:convert' as convert;
void main() async {
final apiUrl = 'https://cloud.idrsolutions.com/cloud/buildvu';
final filePath = 'path/to/exampleFile.pdf';
final file = File(filePath);
// Prepare the request headers and form data
final request = http.MultipartRequest('POST', Uri.parse(apiUrl));
request.fields['token'] = 'YOUR_TRIAL_TOKEN'; // Token provided to you via e-mail
request.fields['input'] = 'upload';
// Add the file to the form data
final fileBytes = await file.readAsBytes();
final fileStream = http.ByteStream.fromBytes(fileBytes);
final fileLength = file.lengthSync();
final fileName = basename(filePath);
request.files.add(http.MultipartFile(
'file',
fileStream,
fileLength,
filename: fileName,
contentType: MediaType('application', 'pdf'),
));
late String uuid;
// Send the request to upload the file
try {
final response = await request.send();
if (response.statusCode != 200) {
print('Error uploading file: ${response.statusCode}');
exit(1);
}
final responseBody = await response.stream.bytesToString();
final Map<String, dynamic> responseData = convert.jsonDecode(responseBody);
uuid = responseData['uuid'];
print('File uploaded successfully!');
} catch (e) {
print('Error uploading file: $e');
exit(1);
}
// Poll until done
try {
while (true) {
final pollResponse = await http.Request('GET', Uri.parse('$apiUrl?uuid=$uuid')).send();
if (pollResponse.statusCode != 200) {
print('Error Polling: ${pollResponse.statusCode}');
exit(1);
}
final Map<String, dynamic> pollData = convert.jsonDecode(await pollResponse.stream.bytesToString());
if (pollData['state'] == "processed") {
print("Preview URL: ${pollData['previewUrl']}");
print("Download URL: ${pollData['downloadUrl']}");
break;
} else {
print("Polling: ${pollData['state']}");
}
// Wait for next poll
await Future.delayed(Duration(seconds: 1));
}
} catch (e) {
print('Error polling file: $e');
exit(1);
}
}
More information about accessing the cloud microservice with PHPMore information about accessing the cloud microservice with RubyMore information about accessing the cloud microservice with C#More information about accessing the cloud microservice with Node.jsMore information about accessing the cloud microservice with PythonMore information about accessing the cloud microservice with JavaScriptMore information about accessing the cloud microservice with JavaMore information about accessing the cloud microservice with Dart
Trial BuildVu with Ruby
Get started with the following steps:
- Ensure Ruby 2.0 (or higher) is installed
- Run the following command:
gem install idr_cloud_client
- Copy/Paste the code on the right
<?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)
// To add the client to your project use will need to add the file idrcloudclient.js to your project and include the following line to access it:
// <script src="path/to/idrcloudclient.js" type="text/javascript"></script>
var endpoint = 'https://cloud.idrsolutions.com/cloud/' + IDRCloudClient.BUILDVU;
var parameters = {
token: 'YOUR_TRIAL_TOKEN', // Token provided to you via e-mail
input: IDRCloudClient.UPLOAD,
file: 'path/to/exampleFile.pdf'
}
function progressListener(e) {
console.log(JSON.stringify(e));
}
function failureListener(e) {
console.log(e);
console.log('Failed!');
}
function successListener(e) {
console.log(JSON.stringify(e));
console.log('Download URL: ' + e.downloadUrl);
}
IDRCloudClient.convert({
endpoint: endpoint,
parameters: parameters,
// The below are the available listeners
progress: progressListener,
success: successListener,
failure: failureListener
});
import java.util.Map;
public final class ExampleUsage {
public static void main(final String[] args) {
final IDRCloudClient client = new IDRCloudClient("https://cloud.idrsolutions.com/cloud/" + IDRCloudClient.BUILDVU);
final HashMap<String, String> params = new HashMap<>();
params.put("token", "YOUR_TRIAL_TOKEN"); // Token provided to you via e-mail
params.put("input", IDRCloudClient.UPLOAD);
params.put("file", "path/to/file.pdf");
try {
final Map<String, String> results = client.convert(params);
System.out.println(" --------- ");
System.out.println(results.get("previewUrl"));
IDRCloudClient.downloadResults(results, "path/to/outputDir", "example");
} catch (final ClientException | InterruptedException e) {
e.printStackTrace();
}
}
}
import 'dart:io';
import 'package:http/http.dart' as http;
import 'package:http_parser/http_parser.dart';
import 'package:path/path.dart';
import 'dart:convert' as convert;
void main() async {
final apiUrl = 'https://cloud.idrsolutions.com/cloud/buildvu';
final filePath = 'path/to/exampleFile.pdf';
final file = File(filePath);
// Prepare the request headers and form data
final request = http.MultipartRequest('POST', Uri.parse(apiUrl));
request.fields['token'] = 'YOUR_TRIAL_TOKEN'; // Token provided to you via e-mail
request.fields['input'] = 'upload';
// Add the file to the form data
final fileBytes = await file.readAsBytes();
final fileStream = http.ByteStream.fromBytes(fileBytes);
final fileLength = file.lengthSync();
final fileName = basename(filePath);
request.files.add(http.MultipartFile(
'file',
fileStream,
fileLength,
filename: fileName,
contentType: MediaType('application', 'pdf'),
));
late String uuid;
// Send the request to upload the file
try {
final response = await request.send();
if (response.statusCode != 200) {
print('Error uploading file: ${response.statusCode}');
exit(1);
}
final responseBody = await response.stream.bytesToString();
final Map<String, dynamic> responseData = convert.jsonDecode(responseBody);
uuid = responseData['uuid'];
print('File uploaded successfully!');
} catch (e) {
print('Error uploading file: $e');
exit(1);
}
// Poll until done
try {
while (true) {
final pollResponse = await http.Request('GET', Uri.parse('$apiUrl?uuid=$uuid')).send();
if (pollResponse.statusCode != 200) {
print('Error Polling: ${pollResponse.statusCode}');
exit(1);
}
final Map<String, dynamic> pollData = convert.jsonDecode(await pollResponse.stream.bytesToString());
if (pollData['state'] == "processed") {
print("Preview URL: ${pollData['previewUrl']}");
print("Download URL: ${pollData['downloadUrl']}");
break;
} else {
print("Polling: ${pollData['state']}");
}
// Wait for next poll
await Future.delayed(Duration(seconds: 1));
}
} catch (e) {
print('Error polling file: $e');
exit(1);
}
}
More information about accessing the cloud microservice with PHPMore information about accessing the cloud microservice with RubyMore information about accessing the cloud microservice with C#More information about accessing the cloud microservice with Node.jsMore information about accessing the cloud microservice with PythonMore information about accessing the cloud microservice with JavaScriptMore information about accessing the cloud microservice with JavaMore information about accessing the cloud microservice with Dart
Trial BuildVu with C#
Get started with the following steps:
- Ensure .NET 2.0 (or higher) and Nuget is installed
- Run the following command:
nuget install idrsolutions-csharp-client
- Copy/Paste the code on the right
<?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)
// To add the client to your project use will need to add the file idrcloudclient.js to your project and include the following line to access it:
// <script src="path/to/idrcloudclient.js" type="text/javascript"></script>
var endpoint = 'https://cloud.idrsolutions.com/cloud/' + IDRCloudClient.BUILDVU;
var parameters = {
token: 'YOUR_TRIAL_TOKEN', // Token provided to you via e-mail
input: IDRCloudClient.UPLOAD,
file: 'path/to/exampleFile.pdf'
}
function progressListener(e) {
console.log(JSON.stringify(e));
}
function failureListener(e) {
console.log(e);
console.log('Failed!');
}
function successListener(e) {
console.log(JSON.stringify(e));
console.log('Download URL: ' + e.downloadUrl);
}
IDRCloudClient.convert({
endpoint: endpoint,
parameters: parameters,
// The below are the available listeners
progress: progressListener,
success: successListener,
failure: failureListener
});
import java.util.Map;
public final class ExampleUsage {
public static void main(final String[] args) {
final IDRCloudClient client = new IDRCloudClient("https://cloud.idrsolutions.com/cloud/" + IDRCloudClient.BUILDVU);
final HashMap<String, String> params = new HashMap<>();
params.put("token", "YOUR_TRIAL_TOKEN"); // Token provided to you via e-mail
params.put("input", IDRCloudClient.UPLOAD);
params.put("file", "path/to/file.pdf");
try {
final Map<String, String> results = client.convert(params);
System.out.println(" --------- ");
System.out.println(results.get("previewUrl"));
IDRCloudClient.downloadResults(results, "path/to/outputDir", "example");
} catch (final ClientException | InterruptedException e) {
e.printStackTrace();
}
}
}
import 'dart:io';
import 'package:http/http.dart' as http;
import 'package:http_parser/http_parser.dart';
import 'package:path/path.dart';
import 'dart:convert' as convert;
void main() async {
final apiUrl = 'https://cloud.idrsolutions.com/cloud/buildvu';
final filePath = 'path/to/exampleFile.pdf';
final file = File(filePath);
// Prepare the request headers and form data
final request = http.MultipartRequest('POST', Uri.parse(apiUrl));
request.fields['token'] = 'YOUR_TRIAL_TOKEN'; // Token provided to you via e-mail
request.fields['input'] = 'upload';
// Add the file to the form data
final fileBytes = await file.readAsBytes();
final fileStream = http.ByteStream.fromBytes(fileBytes);
final fileLength = file.lengthSync();
final fileName = basename(filePath);
request.files.add(http.MultipartFile(
'file',
fileStream,
fileLength,
filename: fileName,
contentType: MediaType('application', 'pdf'),
));
late String uuid;
// Send the request to upload the file
try {
final response = await request.send();
if (response.statusCode != 200) {
print('Error uploading file: ${response.statusCode}');
exit(1);
}
final responseBody = await response.stream.bytesToString();
final Map<String, dynamic> responseData = convert.jsonDecode(responseBody);
uuid = responseData['uuid'];
print('File uploaded successfully!');
} catch (e) {
print('Error uploading file: $e');
exit(1);
}
// Poll until done
try {
while (true) {
final pollResponse = await http.Request('GET', Uri.parse('$apiUrl?uuid=$uuid')).send();
if (pollResponse.statusCode != 200) {
print('Error Polling: ${pollResponse.statusCode}');
exit(1);
}
final Map<String, dynamic> pollData = convert.jsonDecode(await pollResponse.stream.bytesToString());
if (pollData['state'] == "processed") {
print("Preview URL: ${pollData['previewUrl']}");
print("Download URL: ${pollData['downloadUrl']}");
break;
} else {
print("Polling: ${pollData['state']}");
}
// Wait for next poll
await Future.delayed(Duration(seconds: 1));
}
} catch (e) {
print('Error polling file: $e');
exit(1);
}
}
More information about accessing the cloud microservice with PHPMore information about accessing the cloud microservice with RubyMore information about accessing the cloud microservice with C#More information about accessing the cloud microservice with Node.jsMore information about accessing the cloud microservice with PythonMore information about accessing the cloud microservice with JavaScriptMore information about accessing the cloud microservice with JavaMore information about accessing the cloud microservice with Dart
Trial BuildVu with Node.JS
Get started with the following steps:
- Ensure Node.js (or higher) and NPM is installed
- Run the following command:
npm install --save @idrsolutions/idrcloudclient
- Copy/Paste the code on the right
<?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)
// To add the client to your project use will need to add the file idrcloudclient.js to your project and include the following line to access it:
// <script src="path/to/idrcloudclient.js" type="text/javascript"></script>
var endpoint = 'https://cloud.idrsolutions.com/cloud/' + IDRCloudClient.BUILDVU;
var parameters = {
token: 'YOUR_TRIAL_TOKEN', // Token provided to you via e-mail
input: IDRCloudClient.UPLOAD,
file: 'path/to/exampleFile.pdf'
}
function progressListener(e) {
console.log(JSON.stringify(e));
}
function failureListener(e) {
console.log(e);
console.log('Failed!');
}
function successListener(e) {
console.log(JSON.stringify(e));
console.log('Download URL: ' + e.downloadUrl);
}
IDRCloudClient.convert({
endpoint: endpoint,
parameters: parameters,
// The below are the available listeners
progress: progressListener,
success: successListener,
failure: failureListener
});
import java.util.Map;
public final class ExampleUsage {
public static void main(final String[] args) {
final IDRCloudClient client = new IDRCloudClient("https://cloud.idrsolutions.com/cloud/" + IDRCloudClient.BUILDVU);
final HashMap<String, String> params = new HashMap<>();
params.put("token", "YOUR_TRIAL_TOKEN"); // Token provided to you via e-mail
params.put("input", IDRCloudClient.UPLOAD);
params.put("file", "path/to/file.pdf");
try {
final Map<String, String> results = client.convert(params);
System.out.println(" --------- ");
System.out.println(results.get("previewUrl"));
IDRCloudClient.downloadResults(results, "path/to/outputDir", "example");
} catch (final ClientException | InterruptedException e) {
e.printStackTrace();
}
}
}
import 'dart:io';
import 'package:http/http.dart' as http;
import 'package:http_parser/http_parser.dart';
import 'package:path/path.dart';
import 'dart:convert' as convert;
void main() async {
final apiUrl = 'https://cloud.idrsolutions.com/cloud/buildvu';
final filePath = 'path/to/exampleFile.pdf';
final file = File(filePath);
// Prepare the request headers and form data
final request = http.MultipartRequest('POST', Uri.parse(apiUrl));
request.fields['token'] = 'YOUR_TRIAL_TOKEN'; // Token provided to you via e-mail
request.fields['input'] = 'upload';
// Add the file to the form data
final fileBytes = await file.readAsBytes();
final fileStream = http.ByteStream.fromBytes(fileBytes);
final fileLength = file.lengthSync();
final fileName = basename(filePath);
request.files.add(http.MultipartFile(
'file',
fileStream,
fileLength,
filename: fileName,
contentType: MediaType('application', 'pdf'),
));
late String uuid;
// Send the request to upload the file
try {
final response = await request.send();
if (response.statusCode != 200) {
print('Error uploading file: ${response.statusCode}');
exit(1);
}
final responseBody = await response.stream.bytesToString();
final Map<String, dynamic> responseData = convert.jsonDecode(responseBody);
uuid = responseData['uuid'];
print('File uploaded successfully!');
} catch (e) {
print('Error uploading file: $e');
exit(1);
}
// Poll until done
try {
while (true) {
final pollResponse = await http.Request('GET', Uri.parse('$apiUrl?uuid=$uuid')).send();
if (pollResponse.statusCode != 200) {
print('Error Polling: ${pollResponse.statusCode}');
exit(1);
}
final Map<String, dynamic> pollData = convert.jsonDecode(await pollResponse.stream.bytesToString());
if (pollData['state'] == "processed") {
print("Preview URL: ${pollData['previewUrl']}");
print("Download URL: ${pollData['downloadUrl']}");
break;
} else {
print("Polling: ${pollData['state']}");
}
// Wait for next poll
await Future.delayed(Duration(seconds: 1));
}
} catch (e) {
print('Error polling file: $e');
exit(1);
}
}
More information about accessing the cloud microservice with PHPMore information about accessing the cloud microservice with RubyMore information about accessing the cloud microservice with C#More information about accessing the cloud microservice with Node.jsMore information about accessing the cloud microservice with PythonMore information about accessing the cloud microservice with JavaScriptMore information about accessing the cloud microservice with JavaMore information about accessing the cloud microservice with Dart
Trial BuildVu with Python
Get started with the following steps:
- Ensure Python 3 (or higher) and pip is installed
- Run the following command:
pip install IDRCloudClient
- Copy/Paste the code on the right
<?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)
// To add the client to your project use will need to add the file idrcloudclient.js to your project and include the following line to access it:
// <script src="path/to/idrcloudclient.js" type="text/javascript"></script>
var endpoint = 'https://cloud.idrsolutions.com/cloud/' + IDRCloudClient.BUILDVU;
var parameters = {
token: 'YOUR_TRIAL_TOKEN', // Token provided to you via e-mail
input: IDRCloudClient.UPLOAD,
file: 'path/to/exampleFile.pdf'
}
function progressListener(e) {
console.log(JSON.stringify(e));
}
function failureListener(e) {
console.log(e);
console.log('Failed!');
}
function successListener(e) {
console.log(JSON.stringify(e));
console.log('Download URL: ' + e.downloadUrl);
}
IDRCloudClient.convert({
endpoint: endpoint,
parameters: parameters,
// The below are the available listeners
progress: progressListener,
success: successListener,
failure: failureListener
});
import java.util.Map;
public final class ExampleUsage {
public static void main(final String[] args) {
final IDRCloudClient client = new IDRCloudClient("https://cloud.idrsolutions.com/cloud/" + IDRCloudClient.BUILDVU);
final HashMap<String, String> params = new HashMap<>();
params.put("token", "YOUR_TRIAL_TOKEN"); // Token provided to you via e-mail
params.put("input", IDRCloudClient.UPLOAD);
params.put("file", "path/to/file.pdf");
try {
final Map<String, String> results = client.convert(params);
System.out.println(" --------- ");
System.out.println(results.get("previewUrl"));
IDRCloudClient.downloadResults(results, "path/to/outputDir", "example");
} catch (final ClientException | InterruptedException e) {
e.printStackTrace();
}
}
}
import 'dart:io';
import 'package:http/http.dart' as http;
import 'package:http_parser/http_parser.dart';
import 'package:path/path.dart';
import 'dart:convert' as convert;
void main() async {
final apiUrl = 'https://cloud.idrsolutions.com/cloud/buildvu';
final filePath = 'path/to/exampleFile.pdf';
final file = File(filePath);
// Prepare the request headers and form data
final request = http.MultipartRequest('POST', Uri.parse(apiUrl));
request.fields['token'] = 'YOUR_TRIAL_TOKEN'; // Token provided to you via e-mail
request.fields['input'] = 'upload';
// Add the file to the form data
final fileBytes = await file.readAsBytes();
final fileStream = http.ByteStream.fromBytes(fileBytes);
final fileLength = file.lengthSync();
final fileName = basename(filePath);
request.files.add(http.MultipartFile(
'file',
fileStream,
fileLength,
filename: fileName,
contentType: MediaType('application', 'pdf'),
));
late String uuid;
// Send the request to upload the file
try {
final response = await request.send();
if (response.statusCode != 200) {
print('Error uploading file: ${response.statusCode}');
exit(1);
}
final responseBody = await response.stream.bytesToString();
final Map<String, dynamic> responseData = convert.jsonDecode(responseBody);
uuid = responseData['uuid'];
print('File uploaded successfully!');
} catch (e) {
print('Error uploading file: $e');
exit(1);
}
// Poll until done
try {
while (true) {
final pollResponse = await http.Request('GET', Uri.parse('$apiUrl?uuid=$uuid')).send();
if (pollResponse.statusCode != 200) {
print('Error Polling: ${pollResponse.statusCode}');
exit(1);
}
final Map<String, dynamic> pollData = convert.jsonDecode(await pollResponse.stream.bytesToString());
if (pollData['state'] == "processed") {
print("Preview URL: ${pollData['previewUrl']}");
print("Download URL: ${pollData['downloadUrl']}");
break;
} else {
print("Polling: ${pollData['state']}");
}
// Wait for next poll
await Future.delayed(Duration(seconds: 1));
}
} catch (e) {
print('Error polling file: $e');
exit(1);
}
}
More information about accessing the cloud microservice with PHPMore information about accessing the cloud microservice with RubyMore information about accessing the cloud microservice with C#More information about accessing the cloud microservice with Node.jsMore information about accessing the cloud microservice with PythonMore information about accessing the cloud microservice with JavaScriptMore information about accessing the cloud microservice with JavaMore information about accessing the cloud microservice with Dart