Hi,
The css propertly ‘‘page-break-inside:avoid’’ is not working when converting HTML to PDF using Aspose HTML . The other css properties works. Are there alternatives for this or is this going to get fixed,
Thanks
Hi,
The css propertly ‘‘page-break-inside:avoid’’ is not working when converting HTML to PDF using Aspose HTML . The other css properties works. Are there alternatives for this or is this going to get fixed,
Thanks
Could you please ZIP and attach your input HTML, problematic and expected output PDF files here for testing? We will investigate the issue and provide you more information on it.
The sample html and css file is attached along with the expected output. The expected output is the pdf generated output via browser print option. But with aspose html library, below styles does not seem to apply. page break sample.zip (250.9 KB)
.comm-section {
page-break-inside: avoid;
}
.commentary-block {
page-break-inside: avoid;
}
}
We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as HTMLNET-3618. You will be notified via this forum thread once this issue is resolved.
We apologize for your inconvenience.
We analyzed the provided document and found an issue that occurs during the processing of the “page-break-inside” property. We are going to fix it in the nearest future. As an alternative solution, you can rename this property to its newer version, “break-inside”, then the document will be converted as expected.
We have attached the modified CSS and PDF files in this post for your kind reference.
trow-css.zip (818 Bytes)
22.1.pdf (62.4 KB)
The issues you have found earlier (filed as HTMLNET-3618) have been fixed in this update. This message was posted using Bugs notification tool by pavel.petrushechkin
Please note that in the latest version, this is again broken. Printing the source HTML does follow the break-inside rule, however Aspose does not.
Would you please share your sample source file with us along with the code snippet that you are using? We will log an investigation ticket and share the ID with you.