var CloudmersiveConvertApiClient = require('cloudmersive-convert-api-client');
var defaultClient = CloudmersiveConvertApiClient.ApiClient.instance;

// Configure API key authorization: Apikey
var Apikey = defaultClient.authentications['Apikey'];
Apikey.apiKey = 'YOUR API KEY';



var apiInstance = new CloudmersiveConvertApiClient.ConvertWebApi();

var input = new CloudmersiveConvertApiClient.HtmlToPdfRequest(); // HtmlToPdfRequest | HTML to PDF request parameters


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.convertWebHtmlToPdf(input, callback);
from __future__ import print_function
import time
import cloudmersive_convert_api_client
from cloudmersive_convert_api_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Apikey
configuration = cloudmersive_convert_api_client.Configuration()
configuration.api_key['Apikey'] = 'YOUR_API_KEY'



# create an instance of the API class
api_instance = cloudmersive_convert_api_client.ConvertWebApi(cloudmersive_convert_api_client.ApiClient(configuration))
input = cloudmersive_convert_api_client.HtmlToPdfRequest() # HtmlToPdfRequest | HTML to PDF request parameters

try:
    # Convert HTML string to PDF
    api_response = api_instance.convert_web_html_to_pdf(input)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConvertWebApi->convert_web_html_to_pdf: %s\n" % e)
using System;
using System.Diagnostics;
using Cloudmersive.APIClient.NET.DocumentAndDataConvert.Api;
using Cloudmersive.APIClient.NET.DocumentAndDataConvert.Client;
using Cloudmersive.APIClient.NET.DocumentAndDataConvert.Model;

namespace Example
{
    public class ConvertWebHtmlToPdfExample
    {
        public void main()
        {
            // Configure API key authorization: Apikey
            Configuration.Default.AddApiKey("Apikey", "YOUR_API_KEY");
            
            

            var apiInstance = new ConvertWebApi();
            var input = new HtmlToPdfRequest(); // HtmlToPdfRequest | HTML to PDF request parameters

            try
            {
                // Convert HTML string to PDF
                byte[] result = apiInstance.ConvertWebHtmlToPdf(input);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConvertWebApi.ConvertWebHtmlToPdf: " + e.Message );
            }
        }
    }
}
// Import classes:
//import com.cloudmersive.client.invoker.ApiClient;
//import com.cloudmersive.client.invoker.ApiException;
//import com.cloudmersive.client.invoker.Configuration;
//import com.cloudmersive.client.invoker.auth.*;
//import com.cloudmersive.client.ConvertWebApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: Apikey
ApiKeyAuth Apikey = (ApiKeyAuth) defaultClient.getAuthentication("Apikey");
Apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.setApiKeyPrefix("Token");

ConvertWebApi apiInstance = new ConvertWebApi();
HtmlToPdfRequest input = new HtmlToPdfRequest(); // HtmlToPdfRequest | HTML to PDF request parameters
try {
    byte[] result = apiInstance.convertWebHtmlToPdf(input);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ConvertWebApi#convertWebHtmlToPdf");
    e.printStackTrace();
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');



$apiInstance = new Swagger\Client\Api\ConvertWebApi(
    
    
    new GuzzleHttp\Client(),
    $config
);
$input = new \Swagger\Client\Model\HtmlToPdfRequest(); // \Swagger\Client\Model\HtmlToPdfRequest | HTML to PDF request parameters

try {
    $result = $apiInstance->convertWebHtmlToPdf($input);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConvertWebApi->convertWebHtmlToPdf: ', $e->getMessage(), PHP_EOL;
}
?>
CMDefaultConfiguration *apiConfig = [CMDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: Apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Apikey"];




CMHtmlToPdfRequest* input = [[CMHtmlToPdfRequest alloc] init]; // HTML to PDF request parameters

CMConvertWebApi*apiInstance = [[CMConvertWebApi alloc] init];

// Convert HTML string to PDF
[apiInstance convertWebHtmlToPdfWithInput:input
          completionHandler: ^(NSData* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling CMConvertWebApi->convertWebHtmlToPdf: %@", error);
                        }
                    }];
# load the gem
require 'cloudmersive-convert-api-client'
# setup authorization
CloudmersiveConvertApiClient.configure do |config|
  # Configure API key authorization: Apikey
  config.api_key['Apikey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Apikey'] = 'Bearer'
end

api_instance = CloudmersiveConvertApiClient::ConvertWebApi.new

input = CloudmersiveConvertApiClient::HtmlToPdfRequest.new # HtmlToPdfRequest | HTML to PDF request parameters


begin
  #Convert HTML string to PDF
  result = api_instance.convert_web_html_to_pdf(input)
  p result
rescue CloudmersiveConvertApiClient::ApiError => e
  puts "Exception when calling ConvertWebApi->convert_web_html_to_pdf: #{e}"
end