I am using the SelectPDF library for my ASP.NET web application to convert a dynamically built HTML to PDF and then print it. The conversion simply looks like this:
HtmlToPdf converter = new HtmlToPdf();
converter.Options.PdfPageSize = PdfPageSize.A5;
converter.Options.PdfPageOrientation = PdfPageOrientation.Landscape;
PdfDocument doc = converter.ConvertHtmlString(FormattedLabelHTML);
doc.Save(Response, false, "Label_" + hfDispatchID.Value + ".pdf");
doc.Close();
The HTML itself is fine, as looking at the FormattedLabelHTML string in debug mode shows it's complete and looks at it should be (it's just HTML tables for each page, with page brakes between them).
But if the number of pages that should be printed is more than 12, then the rendered content stops at 12 pages, leaving the 12th page half-rendered, and the rest completely missing. If the page count is under 12, then they all render properly.
There are no errors thrown, everything executes properly. So does anyone have any tips as to why it can't print more than 12 pages?