Skip to content

Commit b9f1e8a

Browse files
committed
Remove empty pgae in pdf #51
1 parent 96decf4 commit b9f1e8a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

BExIS.Pmm.Model/Plotchart.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,10 @@ public Byte[] generatePDF(List<Plot> plotList, int zoom = 1, bool deactiveGeomet
743743
Html += "<div style='page-break-after:always'></div>";
744744
}
745745
Html += "</body></html>";
746-
746+
747+
// Remove last empty page
748+
Html = Html.Replace("<div style='page-break-after:always'></div></body></html>", "</body></html>");
749+
747750
var htmlToPdf = new NReco.PdfGenerator.HtmlToPdfConverter();
748751
var pdfBytes = htmlToPdf.GeneratePdf(Html);
749752
return pdfBytes;

0 commit comments

Comments
 (0)