HTML to PDF Request

Astun supply a Getdata Web Service getdata.aspx may be found in the web subfolder. The Request Type of PDF allows customers to set up a link to create a pdf document for the property information if the correct URL is given.

This can be used in My House - see screenshots at the end of this topic.

This uses wkhtmltopdf which would have been installed by the Astun 3rd Party Installer.

Updating the iShare Settings

Before implementing this function the following entry needs to be configured in the Studio Settings for iShare.

  • Master Settings > External > WkhtmltopdfC:\Program Files\WkhtmlToPDF\WkHTMLToPDF.exe

e.g.

Select the entry and use the Browse button to point to the WkHTMLToPDF.exe which you will find in the installation folder for wkhtmltox e.g.

C:\Program Files\WkhtmlToPDF\WkHTMLToPDF.exe

Click OK to update the Settings.

Adding the GetData Request

This can be done in iShare Studio by adding a new row to Virtual Layer. E.g.

In the above screenshot we are using the following getdata request:

Request

http://custom.astun.local/mycouncil/web/getdata.aspx?requesttype=pdf&tab=0,1&enablejs=True&uid=100000000000

Parameters

Name

Requirement

Description

RequestType

mandatory

This will always be “pdf”

tab

mandatory

This is the tab number(s) that you wish to include in your pdf e.g. My property, My Maps etc. where 0 represents the first tab etc.

enablejs

mandatory

This must be set to True to enable JavaScript

uid

mandatory

This is the unique id for the property usually the UPRN [Unique Property Reference Number.

This will result in the "Generate a PDF of this page" link shown in the image below.

Results

Clicking on the link will generate the pdf e.g.

Page 1 = My Property tab [tab=0]

Page 2 = Planning history tab [tab=1]