5
Answers

How to convert html to pdf

Nageshwar Rao

Nageshwar Rao

8y
1.8k
1
HI 
I need some help in converting html to pdf,i have sample code
html=url(*****) 
HtmlToPdfOptions pdfOptions = new HtmlToPdfOptions();
pdfOptions.AutoFitX = HtmlToPdfAutoFitMode.ScaleToFit;
pdfOptions.TriggerMode = HtmlToPdfTriggerMode.Auto;
HtmlToPdf.Options.PageSize = new System.Drawing.SizeF(8.5f, 11f);
HtmlToPdf.Options.StartPageIndex = 1;
HtmlToPdf.Options.StartPosition = 0;
pdfOptions.AutoAdjustForDPI = false;
pdfOptions.PageSize = PdfPageSizes.A4;
EO.Pdf.HtmlToPdf.Options.OutputArea = new System.Drawing.RectangleF(0.5f, 0.5f, 10f, 10f);
HtmlToPdfResult pdf = EO.Pdf.HtmlToPdf.ConvertUrl(Url, @"C:\Pictures\testing3.pdf", pdfOptions);
 
 
but it showing only one page remaining bottom pages are not getting.i want to show all contents in pdf 
Answers (5)