HTML to PDF not applying CSS rules - FREE pdfcrowd works just fine

It seems that Aspose PDF renderer does not recognize all of the CSS rules we apply to the HTML template we use.

List items should be displayed without bullets, progress bars in the lower right corner don't get populated (they should have green background if any width is given to the child element).

We are using the code we found in the documentation under "Convert HTML to PDF Format", which can be viewed in the file "code". The HTML template we use is in the "source.html" file.

Also we provide you with the example renders from the same HTML source using the Aspose.Pdf, Renderer (Grails plugin) and a free web tool called pdfcrowd.

We changed the HTML for the pdfcrowd render just to show that the progress bars in the lower right corner should display green color based on the percent completed (which is not visible in the Aspose render).

The HTML for aspose and renderer renders contains only blank progress bars, but in case they had any value inside, only the renderer would show the green background.


Information:

aspose-pdf-10.4.1


we use groovy: Here is how we call your API:

boolean htmlToPdf(InputStream inputStream, File output, String description) {
try {
com.aspose.pdf.HtmlLoadOptions htmloptions = new com.aspose.pdf.HtmlLoadOptions();
com.aspose.pdf.Document doc = new com.aspose.pdf.Document(inputStream, htmloptions);
mkdirs(output)
doc.save(output.absolutePath);
} catch (Exception ex) {
notifyOnConversionFailure("htmlToPdf failed on [${description}]", ex.getMessage())
log.fatal ex.getMessage()
}
}




Hi Richard,


Thanks for using our API’s.

I have tested the scenario of HTML to PDF conversion and as per my observations, there are many formatting issues when rendering HTML file to PDF format. For the sake of correction, I have logged this problem as PDFNEWJAVA-35208 in
our issue tracking system. We will further look into the details of this
problem and will keep you updated on the status of correction. Please be
patient and spare us little time. We are sorry for this inconvenience.

Now concerning to display of Progress bar, when viewing the file in web browser, I do not see any green progress indication and so is the output in PDF file. For your reference, I have also attached the PDF file generated over my end.

The issues you have found earlier (filed as PDFJAVA-35208) have been fixed in Aspose.Pdf for Java 17.2.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.