We were able to reproduce the issue in our environment while testing the scenario with Aspose.PDF for .NET 20.10. Hence, have logged it as PDFNET-48966 in our issue management system. We will further look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.
You are seeing this issue because it has not been yet resolved. Please note that it is currently under the phase of investigation and as soon as it is fixed, we will update you in this forum thread. Please spare us some time.
We tested the case using 22.3 version of the API and did not notice any exception. For your kind reference, an output PDF is also attached. Please use the latest version of the API and let us know in case you still notice any issue. output.pdf (933.3 KB)
Aspose.PDF API has many internal components that depends upon each other. Sometimes, changes to one component can effect on dependent one. During resolving issues and implementing new features/enhancements, possibility of regression is there. If some regression is noticed, we fix it in the very next version.
Would you please try using Aspose.PDF.Drawing after uninstalling the Aspose.PDF? You can install it using NuGet Package Manager. It is released as beta version to work in Linux like application. Once we are sure that it is working fine in non-Windows environments, we will make it a permanent module in Aspose.PDF.
I will provide some more information, I might not be able to provide code or even the output as it has proprietary information in it.
Application was previously using Aspose.PDF 19.XX version. the html templates were working fine. but after upgrading to Aspose.PDF.Drawing 23.1.0/23.1.1 we are getting Incompatible unit type.
we have narrowed down to item that is causing issue. using display:flex in css or inline style, we have issue. if this is removed, error is gone, but it impacts the formatting.
Surprisingly the HTML loads with no issues in Edge and Chrome browser.
Q: Is there any changes that we should be considering while making such update 19.XX -> 23.1.0? having html/css to adapt to some interpreter or complier(if any) changes?
There is no such certain change that you may require to do in the HTML. However, please take your time to gather some details which can help us in proceeding the investigation further. We will open a ticket and share the ID with you.
I replaced display:flex from styling (css and inline).
This is working for now, so from my understanding aspose.PDF.Drawing is not processing display:flex correctly.
My issue is fixed, posting this, as this might help someone else and just for aspose team to identify are there any other items which are not acceptable by latest version of aspose.PDF (Drawing & normal)
It is nice to hear that your issue has been sorted out. Please note that you can still share sample HTML with us so that we can try to investigate the issue and apply its fix in future versions of the API.