Hi,
I am using Aspose.pdf to convert html to Pdf (File version 11.4.0.0, Product version 2016.03.07).
When I use “page-break-before:always” in combination with “@page :first”, I get a NullReferenceException when I try to load the .html file.
My c# code:
HtmlLoadOptions hlo = new HtmlLoadOptions();
Document doc = new Document(“Form_3.html”, hlo);
My html:
body {
font-family: arial;
font-size: 13px;
margin-left: 10mm;
}
@page {
margin-bottom: 30mm;
}
@page :first {
margin-left: 20mm;
}
.newpage {
page-break-before: always;
}
HELLO.
BYE.
HELLO.
When I remove the @page :first it works fine.
I use the @page :first because the first page should have a different margin on the left.
Is this feature not supported?
Is there a way to avoid this?
Thanks.