/ Published in: C#

This code sample shows how C# developers can create PDF file from HTML using Aspose.Pdf for Cloud API in their REST applications.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
stringstrURI = "http://api.aspose.com/v1.1/pdf/outPdfFile.pdf?templateFile=input.html&templateType=html"; stringsignedURI = Sign(strURI); //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; } }
URL: http://www.aspose.com/docs/display/pdfcloud/Create+PDF+from+HTML
Comments
