Page Break Html --> PDF

Hey!
I’m using Aspose Pdf for .NET Version 9.1.0 and I want to replace a Keyword (like <%Session.Pagebreak%>) with a

div style=‘page-break-after: always’> div

before I convert my html file to pdf.
My question is: Is “page-break-after” Supported in this Version or not? If not, is there any work around or do I need a new Version?
Thanks in advance.

@BennyBRI

Thanks for your inquiry.

We would like to share with you that said CSS property is supported in Aspose.PDF for .NET. However, I am afraid that you are using quite old version of the API whereas, it is always recommended to use latest version. In order to get latest improvements and enhancements, please use latest version of the API and in case you face any issue, please feel free to let us know.

Hey,
sorry for not responding!
Thanks for your Reply.
After I get the new Version from apose. How could I support Page Break?
In my Html text, there will be a Keyword like “Session.PageBreak” and I just want to replace this string with the css, which triggers a page break.

Example:

myhtmlstring.Replace(“Session.PageBreak”,“Insert Page Break trigger here”).

Thanks in advance!

@BennyBRI

Thanks for getting back to us.

You may replace “Session.PageBreak” with “style='page-break-after: always;’” in your HTML and in case it does not help, please share your sample HTML with us. We will test the scenario in our environment and address it accordingly.

Hey,
thanks!!! It worked with “page-break-after” :slight_smile: Even with the old Version.

@BennyBRI

Thanks for your feedback.

It is good to know that your requirement has been fulfilled by suggested approach. Please keep using our API and in case of any other inquiry, feel free to create a new topic.