Revision: 66274
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at April 10, 2014 15:49 by johansonkatherine
Initial Code
stringstrURI = "http://api.aspose.com/v1.1/pdf/outPdfFile.pdf?templateFile=input.html&templateType=html";
stringsignedURI = Sign(strURI);
StreamReader reader = new StreamReader(ProcessCommand(signedURI, "PUT"));
//further process JSON response
stringstrJSON = reader.ReadToEnd();
//Parse the json string to JObject
JObjectparsedJSON = JObject.Parse(strJSON);
BaseResponse stream = JsonConvert.DeserializeObject<BaseResponse>(parsedJSON.ToString());
if (stream.Code == "200" &&stream.Status == "OK")
Console.WriteLine("Empty PDF file has been created successfully");
//Here is the BaseResponse class
public class BaseResponse
{
publicBaseResponse() { }
public string Code { get; set; }
public string Status { get; set; }
}
Initial URL
http://www.aspose.com/docs/display/pdfcloud/Create+PDF+from+HTML
Initial Description
This code sample shows how C# developers can create PDF file from HTML using Aspose.Pdf for Cloud API in their REST applications.
Initial Title
C# Code Sample to Create PDF from HTML Using REST API
Initial Tags
file, java, html, ruby, api, c#
Initial Language
C#