For some reason when I try to create a PDF from HTML using a URL to local Angular 7/8 website, I only get the "Loading...:" message and not the content from the page after it routes. I have tried to set the delay for many minutes and it still doesn't work. It seems that it takes the first "Loading..." message as the final response and creates the PDF with just that information.
My Site calling the code to create the PDF is .Net Core 2.2. I can call other websites and the code works. But when I try to call any Angular Website, it either gives me the "Loading.." or a 404.
And if it helps, I wrote this solution a few weeks ago and it was working fine. No idea what could have changed since then as I have not updated any of your products or DLLs. So maybe a automatic Chrome update or something????
GKGowthamraj Kumar Syncfusion Team November 14, 2019 09:10 AM
Thank you for using Syncfusion products.
We have checked the reported issues in some other Angular website with HTML to PDF converter. But the styles are not rendered in the output PDF document. We have further analyzed the styles used in that angular site, they are using bootstrap4 styles in the website HTML source. But the Bootstrap4 styles are not supported in WebKit rendering engine itself. If the Bootstrap4 styles are used in your Angular website, those styles are not supported in our converter. You can confirm these Bootstrap4 behaviors with Safari browser (windows).
If that reported angular website are not using Bootstrap4 style, kindly provide us the complete HTML/URL (with all the resources styles, scripts, etc.,) and output document to check the issue in our end. So that it will be helpful for us to analyze and assist you further on this.
MGMaria GeorgeNovember 14, 2019 12:15 PM
My issue is not with CSS. My issue is that I only get back a blank PDF when trying to do HTML to PDF of an Angular site. I created a very basic .Net Core/Angular site and put it up on the web. I also removed Bootstrap 4 from it and I still only get back a blank PDF when trying to convert it to PDF. Can you please test using this URL and let me know why I get back a blank PDF? The URL is: https://rontestpdfvb.azurewebsites.net/. I have also attached one of the blank PDF's.
I know my code works because I can get back content when using most URLS across the web like Google etc. But for some reason whenever I try to put in the URL to one of my .Net Core/Angular sites, I only get back a blank PDF.
GKGowthamraj Kumar Syncfusion Team November 15, 2019 08:33 AM
We have converted the provided Angular website, we were able to reproduced the blank page issue. We internally make use of QtWebKit rendering engine for converting HTML to PDF. QtWebKit rendering engine preserves the output PDF document like how the input HTML file/URL is displayed on the WebKit based web browsers (safari). This issue occurs in QtWebKit source itself, you can check the check the behavior in safari browser, the provided angular website is not properly displayed in safari browser. So, the converter preserves the same in the PDF conversion.
To overcome this issue, we are suggested to try our latest Blink rendering engine to avoid blank PDF issue. Blink rendering engine internally make use of chromium executable in headless mode for converting HTML to PDF. We have tried the conversion with angular site in Blink, it converts the page properly. Kindly refer below links for more information of our Blink converter.
But the blink HTML converter is not supported in .NET Core. You can use the Blink in .NET core by using web service, please refer this link for more information.
Please let us know if you need any further assistance on this.
GKGowthamraj Kumar Syncfusion Team February 23, 2021 07:38 AM
Thank you for your patience.
We are glad to announced that our Blink HTML converter is now supported in Net Core. It supports conversion from .NET Core 2.0. Please refer the below prerequisites and NuGet packages for performing Blink conversion.