EVO HTML to PDF Converter

Install EVO PDF Server in an Azure Cloud Service Web Role

EVO PDF Client for .NET Documentation

When the HTML to PDF Server runs in a Web Role of an Azure Cloud Service it can be accessed through an URL.

The Azure Cloud Service Web Role can be found in 'Server\Azure\CloudService\HTTP_WebRole' folder of the location where you extracted the Zip archive of the software. The folder contains the prebuilt package in the 'Bin' subfolder and the Visual Studio source project in 'Src' subfolder.

There are two options to install the HTML to PDF Server in Azure Cloud Service Web Role: from the Visual Studio solution or from the prebuilt package. The prebuilt package is exported from the Visual Studio solution to be used in case you don't have the Azure development tools installed on your machine.

Installing the Azure Web Role from the Visual Studio

The Visual Studio Solution for Azure Cloud Service Web Role there is in 'Server\Azure\CloudService\HTTP_WebRole\Src' folder.

Before publishing the service you can set in the 'Server\Azure\CloudService\HTTP_WebRole\Src\EvoHtmlToPdfWebRole.Azure\ServiceConfiguration.Cloud.cscfg' configuration file various options like a service password or the maximum number of conversions running at the same time.

To publish the Cloud Service from Visual Studio, open the 'EvoHtmlToPdfAzureWebService.sln' solution in Visual Studio, right click on 'EvoHtmlToPdfAzureWebService' project and choose 'Publish' option from the contextual menu.

In the first panel 'Sign In' of the publish wizard choose your Azure subscription and click 'Next'.

In the next panel 'Settings', a popup panel might appear and ask you to create a new Storage Account in case you don't have any Storage Account in your Azure Portal account. In this case choose a name for the new storage account and a 'Region or Affinity Group'. Leave the default value for the other options and click the 'Create' button to go back to the 'Settings' panel.

In the 'Common Settings' tab of the 'Settings' panel, under the 'Cloud Service' option, choose to create a new cloud service or use the suggested name in case you did not have any previous cloud service or storage account in your Azure account. If you choose to create a new Cloud Service you will be prompted to select a name for the cloud service and a 'Region or Affinity Group' for deployment. Click the 'Create' button to return to the 'Settings' panel. Leave the default value for the other options in the 'Settings' panel and click the 'Next' button.

In the next panel 'Diagnostics' choose if you want to send telemetry data to Microsoft and click the 'Next' button.

In the 'Summary' panel you can review the options you have chosen. If everything looks good you can click the 'Publish' button to create and start the cloud service.

You'll be able to see the evolution of the deployment process in Visual Studio. When the deployment is complete you can start using the Web Role URL which by default is 'http://cloud_service_name.cloudapp.net/'. You can use this URL to connect the client library to service in our demo applications and in your applications.

When the deployment is complete you can also login into your account of Microsoft Azure Portal to obtain the public URL of the HTML to PDF service.

In Azure Portal you can find the Cloud Service you created if you select 'All resources' item from the menu of the Azure Management Portal. Click the link to cloud service from the list of resources to open the cloud service 'Overview' panel. In that panel you can see the current status of the cloud service and obtain information about the service including the service public URL.

Installing the Azure Web Role from Prebuilt Package

The prebuilt package for Azure Cloud Service Web Role there is in 'Server\Azure\CloudService\HTTP_WebRole\Bin' folder.

The same package can also be built from 'Server\Azure\CloudService\HTTP_WebRole\Src' Visual Studio project. To build the package from the source project open the 'EvoHtmlToPdfAzureWebService.sln' solution in Visual Studio, right click on 'EvoHtmlToPdfAzureWebService' project and select the 'Package' option.

Before uploading the package you can edit the 'Server\Azure\CloudService\HTTP_WebRole\Bin\ServiceConfiguration.Cloud.cscfg' file to set various options like a service password or the maximum number of conversions running at the same time.

To install the package, login into your account of Microsoft Azure Portal to create a new Cloud Service.

First you have to create a storage account for your cloud service. A quick way to do this is to click the 'Create a resource' menu item from the menu of the Azure Management Portal and search for 'Storage account' in the search text box at the top and then click the 'Create' button to start the Storage Account creation wizard. Choose your Azure subscription, choose to create a new Resource Group and enter a name for the storage account. The same name will be automatically used by the wizard to create a Resource Group you can later use for the cloud service as well. Choose the storage location and leave the default values for the other options. Click 'Review + create' and in the next page and then the 'Create' button to create the storage account. Wait until the storage account creation process is finished.

The next step is to create the Cloud Service. For this click the 'Create a resource' menu item from the menu of the Azure Management Portal and search for 'Cloud Service' in the search text box at the top and then click the 'Create' button to start the Cloud Service creation wizard. Select a DNS name for your cloud service, which can be the same with the name used for the storage account, choose the Resource Group automatically created at the previous step and select the location where to create the service.

Upload the prebuilt package and the configuration files by clicking the 'Select a Package' option in the same panel. In the new options panel which opens enter the deployment label, which can be the same name you used for DNS name, select the storage account you created at the previous step and browse the local computer folders to choose the package file 'EvoHtmlToPdfAzureWebService.cspkg' and configuration file 'ServiceConfiguration.Cloud.cscfg' from the 'Server\Azure\CloudService\HTTP_WebRole\Bin' folder.

Check on the 'Deploy even if one or more roles contain a single instance' and 'Start deployment' options and wait until the package is uploaded and the 'OK' button is enabled in panel and click that button to close the panel and then the 'Create' button in the initial wizard panel.

The deployment can take a few minutes and it can also take a few more minutes until the instance status becomes 'Running'. You can find the Cloud Service being created if you select 'All resources' item from the menu of the Azure Management Portal. Click the link to cloud service being created from the list of resources to open the cloud service 'Overview' panel. In that panel you can see the current status of the cloud service and obtain information about the service including the service URL which by default is 'http://cloud_service_name.cloudapp.net/'. You can use this URL to connect the client library to service in our demo applications and in your applications.

HTML to PDF Server Configuration Options

Before publishing the service you can set in the 'ServiceConfiguration.Cloud.cscfg' configuration file various options like a service password or the maximum number of conversions running at the same time. The configuration options are listed below.

  • Distributed Option - This option is false by default and it can be enabled to run each conversion in a separate process. It offers more isolation between parallel conversions but it can be slower.

  • MaxConcurrentClients Option - This option has value 12 by default and it indicates how many conversions are running in parallel. If the maximum number of parallel conversions was reached the subsequent conversion are queued until an execution slot becomes available.

  • ServicePassword Option - This option is empty by default and it can be set with a password string to be verified by the service before accepting a conversion request.

  • Impersonation Options - The ImpersonationUsername, ImpersonationPassword, ImpersonationDomain and ImpersonationLogonMode options are empty by default and they can be used to run the service under a specific user account on the hosting Windows machine.

Uninstallation

You can remove the cloud service from your Azure account management portal.