We are looking for a HTML to PDF solution can save a dashboard html as a PDF, but without any success. It is always give a blank page. is Apose HTMl or PDF good with canvas data? 1st We try to conver this page. Examples - Apache ECharts and it is completely blank. 2nd then we tried some local html file with/without js. non of them work. Any help will be really appreciate.
It sounds like you’re encountering issues with converting HTML to PDF, particularly with dashboards that include canvas data. Here’s a structured approach to troubleshoot and resolve the blank page issue:
Cause: The blank page issue may stem from JavaScript execution problems, unsupported HTML structures, or dependencies on external resources that are not accessible during the conversion process.
Solution:
Check JavaScript Execution: Ensure that your HTML content is fully rendered before conversion. Aspose.PDF supports JavaScript, but if the canvas elements are not rendered properly, it may result in a blank PDF. Start by testing with a simpler HTML file to confirm that the conversion works.
Use a Supported HTML Structure: Verify that the HTML you are trying to convert is well-structured and does not rely heavily on external resources.
Test with Local Files: Ensure that your local HTML files are self-contained and do not depend on external scripts or stylesheets that could be causing issues.
Update Aspose.PDF: If you are using an older version of Aspose.PDF, update to the latest version, as improvements or bug fixes related to HTML to PDF conversion may resolve your issue.
Debugging: Enable logging to capture any errors or warnings during the conversion process, which can provide insight into what might be going wrong.
Next Steps: Here’s a minimal code example to get you started with converting a simple HTML file to PDF:
using Aspose.Pdf;
Document pdfDocument = new Document();
pdfDocument.LoadHtml("<html><body><h1>Hello World</h1></body></html>");
pdfDocument.Save("output.pdf");
Try this with a basic HTML structure first, and then gradually add complexity to identify where the issue arises. If you continue to experience problems or have further questions, please let me know, and I’ll be happy to assist you further!
We tried but non of above works. actually we read these before some where. Can any support try with to convert this to PDF? Examples - Apache ECharts I tried with your online html to PDF conversation it was produce blank page as well. if that’s works we will put the order through.
We tested in our environment and noticed that a blank PDF was generated when we converted index.html file. Is it the same behavior that you are noticing?
yes, that’s exactly what we are facing. any resolutions? cause from what I understand your module support JS and html 5 canvas/svg. either canvas nor svg works.
var myChart = echarts.init(document.getElementById(“chart”),null,{renderer:‘svg’,});
var myChart1 = echarts.init(document.getElementById(“chart1”),null,{renderer:‘svg’,});
if you remove renderer:‘svg’, it will render canvas. still blank page.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFNET-60560
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Hello, is this issue solvable or if there are any time indication will be great. We are keen to move foward potential to a site OEM upon this resolved, but we do not hold a paid support service right now.
The ticket has recently been logged and will be prioritized on a first-come, first-served basis. We are afraid that we cannot share any timeline for the ticket resolution at the moment. As soon as analysis is done and investigation is completed, we will be able to share some feedback in this regard. Please be patient and spare us some time.