Hi, I tried to convert an HTML file to a PDF by following simple code:
string inputHtml = “source.html”;
string outputPDF = “dest.pdf”;
Aspose.Pdf.HtmlLoadOptions options = new Aspose.Pdf.HtmlLoadOptions();
options.PageInfo.Margin.Left = 20;
options.PageInfo.Margin.Right = 20;
options.PageInfo.Margin.Top = 25;
options.PageInfo.Margin.Bottom = 25;
Aspose.Pdf.Document pdf = new Aspose.Pdf.Document(inputHtml, options);
pdf.Info.Clear();
pdf.Save(outputPDF);
But this operation generates (after a long time) an OutOfMemoryException for a big html like the attached one.
Can you help us to solve the problem?source.zip (26.0 KB)