Hi Guys
I am having problem with output pdf shrunk with too much {top, left, right and bottom} margins.
Is there a way to fix output pdf result to not shrink the page margins?
ASP.NET C# WebForm Framework 4.7.2 and Using Telerik File Ver 2017.1.213.40
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using Telerik.Windows.Documents.Flow.FormatProviders.Html;
using Telerik.Windows.Documents.Flow.FormatProviders.Pdf;
using Telerik.Windows.Documents.Flow.Model;
public static byte[] ConvertHtmlToPdf(string htmlContent)
{
// 1. Initialize the HTML provider to parse the string
HtmlFormatProvider htmlProvider = new HtmlFormatProvider();
// 2. Import the HTML into a Telerik RadFlowDocument object
RadFlowDocument document = htmlProvider.Import(htmlContent);
// 3. Initialize the PDF provider to convert the document object
PdfFormatProvider pdfProvider = new PdfFormatProvider();
// 4. Export the document structure to a byte array
byte[] pdfBytes = pdfProvider.Export(document);
return pdfBytes;
}
