using (GdPictureDocumentConverter gdpictureDocumentConverter = new GdPictureDocumentConverter())
{
// Set the text and document properties to be used for the resulting file.
gdpictureDocumentConverter.HtmlPageHeight = 842; // A3 page size
gdpictureDocumentConverter.HtmlPageWidth = 1191; // A3 page size
gdpictureDocumentConverter.HtmlPageMarginTop = 10;
gdpictureDocumentConverter.HtmlPageMarginBottom = 10;
gdpictureDocumentConverter.HtmlPageMarginLeft = 10;
gdpictureDocumentConverter.HtmlPageMarginRight = 10;
using (Stream inputStream = File.Open("input.html", System.IO.FileMode.Open))
{
using (Stream outputStream = File.Create("output.pdf"))
{
gdpictureDocumentConverter.ConvertToPDF(inputStream, GdPicture14.DocumentFormat.DocumentFormatHTML, outputStream, PdfConformance.PDF1_5);
}
}
}