I have put together a simple example to illustrate that the CSS is never applied to the PDF file. But before I could get that issue resolved, I’ve encountered an exception. Can you let me know if it is something I’m doing or is something wrong with ASPOSE.PDF. This example expects to be extracted to the C:\TEMP folder.
I keep getting an error when trying to upload my example.
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
You will need to add ASPOSE.PDF from NuGet for this example to work. I had to remove ASPOSE package in order for the upload to work. I was using 10.2.
string html = File.ReadAllText(@“C:\Temp\Temp\test.html”);<o:p></o:p>
HtmlLoadOptions htmlLoadOptions = new HtmlLoadOptions();<o:p></o:p>
MemoryStream ms1 = new MemoryStream(Encoding.UTF8.GetBytes(html));<o:p></o:p>
Document doc = null;<o:p></o:p>
doc = new Document(ms1, htmlLoadOptions);<o:p></o:p>doc.Save(@“C:\Temp\Temp\test.pdf”);
The files I sent should all be in the C:\Temp folder not C:\Temp\Temp. If you launch the HTML file in a browser, you should see that all the CSS is applied and the resulting page looks nice. The PDF you sent is lacking all styling because ASPOSE didn’t find any of the CSS files. Can you try it again by moving everything to C:\Temp?
Thanks for your feedback. We have tested your shared document using Aspose.Pdf for .NET 10.2.0 and managed to observe the reported exception. For further investigation, I have logged an issue in our issue tracking system as PDFNEWNET-38482 and also linked your request to it. We will keep you updated via this thread regarding the issue status.
Please feel free to contact us for any further assistance.
Any update on this?
Can I get an ETA of when this issue will be looked at or some sort of work around? My project is nearing completion and I need some sort of solution.
that as a normal rule of practice, issues are resolved in first come and first
serve basis; but the problems logged/reported under Enterprise or Priority
support model, have high precedence in terms of resolution, as compare to
issues under normal/free support model. As your earlier reported issue is under normal support model, so it will be investigated/resolved as per development schedule.
However I have shared your concerns with development team and as soon as we have some further updates, we will let you know.
The issues you have found earlier (filed as PDFNET-38482) have been fixed in Aspose.PDF for .NET 20.1.