API Manual

Thanks to our API available for our clients, Handwritten Document can be now generated by using simple HTTP request. Method has to be set to POST and Action or Url to: http://api.handwrittensolutions.net/generateHandwrittenDocument.aspx.

Variables

Currently available Variables are:

- txtPassphrase: This is just basic and temprorary way of Authentication. Please contact us if you need to do tests. We will send you the value for this variable.

- txtColor: This is how you set the color for the content of the document. Sample value: #1F0071 (gives nice blue pen color).

- txtBold: Set the bold style property of the generated document

- txtStyle: Choose the handwriting style property of the generated document

- txtContent: This is where the content of the letter will be stored. Please use simple formatting. Special formatting and xml tags currently are not supported and error will be produced.

- txtWidth: The width of the page in pixels. Default value: 2480 (width of A4 paper size assuming the resolution is 300 dpi)

- txtHeight: The height of the page in pixels. Default value: 3508 (width of A4 paper size assuming the resolution is 300 dpi)

- txtResolution: The resolution of the generated document in dpi. Default value: 300 (this is the recommended value for printing quality)

- txtTopMargin: The top margin of the generated document in pixels. Defalult value: 250

- txtBottomMargin: The bottom margin of the generated document in pixels. Defalult value: 250

- txtLeftMargin: The left margin of the generated document in pixels. Defalult value: 250

- txtRightMargin: The right margin of the generated document in pixels. Defalult value: 250

- txtFillBackground: Determine if background should be filled with some color or transparent. Default value: True

- txtBackgroundColor: The background color of the generated document in pixels. Defalult value: #FFFFFF (white)

- txtCharacterSpacing: The character spacing of the generated document in pixels. Defalult value: 0

- txtWordSpacing: The word spacing of the generated document in pixels. Defalult value: 0

- txtRowSpacing: The row spacing of the generated document in pixels. Defalult value: 0

- txtCharacterScale: The character scale or the size of the letters for the generated document in pixels. Defalult value: 1.17. Best results between 1.15 and 1.22.

Important! After version 1.0.2.1. of our WebApi, the variables are not mandatory any more. If not provided value for some variable, its default value will be assigned.

Accept Header

Following values are available as Accept header values:

- Accept: application/json: This will return Base64 version of the PNG Image formated as json.
Example: {"image":"iVBORw0KGgoAAAAN < base64 png image> AAAAuvPkNAAAAAXN"}

- Accept: application/xml: This will return Base64 version of the PNG Image formated as xml.
Example: <image> iVBORw0KGgoAAAANSUhEUgAACbAAAA20CAY< base64 png image> AAAAuvPkNAAAAAXN</image>

- Accept: image/png: This will cause writing the raw binary data of the png formatted image, directly in the response. Since there is no data conversion to base64 this approach gives the best performance.

- Accept: application/text or any other value different than above: This will return simple html with Base64 version of the PNG Image formated as html will be included.
Example: <img width="400" style="border:1px solid #454545;" src="data:image/png;base64,iVBOR < base64 png image > AENgOAGak9/kI=" />


This document was last updated on December 1, 2015