Hi,
I am trying to convert a consent form HTML into a PDF. Our consent forms include the patients' signatures in the form of SVG and PATH. An example is attached.
I can see the signature on Safari, Chrome, and Edge. Blink rendering engine perfectly renders the signature (HTML to PDF conversion has been one of our main tools and we haven't run into any issues so far)
But the WebKit rendering engine cannot render the SVG paths.
Can someone take a look at our specific example and let us know which way to go? I've been searching the web and trying different parameters for a few days but no luck.
Our stack:
.NET 5.0 deployed on Azure App Services
Syncfusion.Pdf.Net.Core 19.4.0.56
Syncfusion.HtmlToPdfConverter.Blink.Net.Core.Windows 19.4.0.56
QtBinaries 19.4.0.38 (latest we could find)
Thank you
Hi Burak,
We have checked the reported issue with HTML to PDF
converter. Our HTML converter internally make use of Qt WebKit rendering engine
for converting HTML to PDF. WebKit rendering engine preserves the output PDF
document like how the input HTML file/URL is displayed on the WebKit based web
browsers (safari, internal tool). The reported signature content missing issue
are occurs in WebKit rendering engine itself, you can confirm these behaviors
with safari web browsers. The same behavior as replicates in our converter. We
have attached a screenshot of the provided webpages view in safari browser for
your reference. So we could not proceed further with WebKit rendering engine.
Safari screenshot:
|
|
We have attached the Qt WebKit browser for
your reference. Please find the browser below link,
Qt WebKit browser: https://www.syncfusion.com/downloads/support/directtrac/general/ze/FancyBrowser-1169646589
Steps to use the WebKit browser (internal tool):
Fancy Browser Screenshot:
|
|
However, we have suggested you try
our new Blink-based HTML converter to
achieve your requirement. It is working properly.
Blink converter internally makes use of chromium executable in headless mode for
converting HTML to PDF. Kindly refer to below
link for more information on our Blink converter.
Blink: https://help.syncfusion.com/file-formats/pdf/convert-html-to-pdf/blink
Document: https://www.syncfusion.com/downloads/support/directtrac/general/pd/BlinkSampleOutput-1752218551
Please try the above suggestions in your end and let us know if you need any further assistance on this.
Regards,
Gowthamraj K
Hi,
I should have mentioned that due to external limitations we are only allowed to use the WebKit rendering engine.
I will work on getting the HTML file working on Safari. Do you know why the signatures won't show up on WebKit based browsers? This may save me some time.
Thank you
Hi,
I got the SVG working.
.svgauthsign path {
transform: scale(_NAVIGATERCONSENTSIGNATURESCALE_);
-webkit-transform: scale(_NAVIGATERCONSENTSIGNATURESCALE_);
}
I just needed to add -webkit-transform to the CSS above.
Fancy Browser helped a lot.
Thanks!
Hi Burak,
Thank you for your update. We are glad to know that your problem has been solved. Please let us know if you require any further assistance with this.
Regards,
Gowthamraj K
BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); using this give below error in code
2025-02-12 06:52:14.378 +00:00 [ERR] Error in converting html to pdf
Syncfusion.Pdf.PdfException: Failed to launch chromium: Due to insufficient permission unable to launch chromium process for conversion.
---> System.Exception: Failed to launch chromium: Due to insufficient permission unable to launch chromium process for conversion.
at Syncfusion.HtmlConverter.BlinkConverter.BlinkResult(Stream outputStream)
at Syncfusion.HtmlConverter.BlinkConverter.ConvertToPdf(String url, PdfDocument& document)
--- End of inner exception stack trace ---
at Syncfusion.HtmlConverter.BlinkConverter.Convert(String url)
at Syncfusion.HtmlConverter.HtmlToPdfConverter.Convert(String url)
at FcceEWalletWebsiteV2.TransactionServices.ExportService.CreatePdfTransferFundAsync(String senderName, String senderEmail, String recipientName, String recipientEmail, Nullable`1 amount, String date, String transactionId) in C:\Users\nitin\source\repos\Fcce\Fcce Ewallet Website\srcV2\FcceEWalletWebsiteV2.TransactionServices\ExportService.cs:line 100
2025-02-12 06:52:14.380 +00:00 [ERR] Error in converting html to pdf
Syncfusion.Pdf.PdfException: Failed to launch chromium: Due to insufficient permission unable to launch chromium process for conversion.
---> System.Exception: Failed to launch chromium: Due to insufficient permission unable to launch chromium process for conversion.
at Syncfusion.HtmlConverter.BlinkConverter.BlinkResult(Stream outputStream)
at Syncfusion.HtmlConverter.BlinkConverter.ConvertToPdf(String url, PdfDocument& document)
--- End of inner exception stack trace ---
at Syncfusion.HtmlConverter.BlinkConverter.Convert(String url)
at Syncfusion.HtmlConverter.HtmlToPdfConverter.Convert(String url)
at FcceEWalletWebsiteV2.TransactionServices.ExportService.CreatePdfTransferFundAsync(String senderName, String senderEmail, String recipientName, String recipientEmail, Nullable`1 amount, String date, String transactionId) in C:\Users\nitin\source\repos\Fcce\Fcce Ewallet Website\srcV2\FcceEWalletWebsiteV2.TransactionServices\ExportService.cs:line 100
at FcceEwalletWebsiteV2.Components.Pages.TransactionHistory.TransactionDetailsBase.SavePdfAsync() in C:\Users\nitin\source\repos\Fcce\Fcce Ewallet Website\FcceEwalletWebsiteV2\Components\Pages\TransactionHistory\TransactionDetails.razor.cs:line 72
2025-02-12 06:52:14.383 +00:00 [WRN] Unhandled exception rendering component: Failed to launch chromium: Due to insufficient permission unable to launch chromium process for conversion.
Syncfusion.Pdf.PdfException: Failed to launch chromium: Due to insufficient permission unable to launch chromium process for conversion.
---> System.Exception: Failed to launch chromium: Due to insufficient permission unable to launch chromium process for conversion.
at Syncfusion.HtmlConverter.BlinkConverter.BlinkResult(Stream outputStream)
at Syncfusion.HtmlConverter.BlinkConverter.ConvertToPdf(String url, PdfDocument& document)
--- End of inner exception stack trace ---
at Syncfusion.HtmlConverter.BlinkConverter.Convert(String url)
at Syncfusion.HtmlConverter.HtmlToPdfConverter.Convert(String url)
at FcceEWalletWebsiteV2.TransactionServices.ExportService.CreatePdfTransferFundAsync(String senderName, String senderEmail, String recipientName, String recipientEmail, Nullable`1 amount, String date, String transactionId) in C:\Users\nitin\source\repos\Fcce\Fcce Ewallet Website\srcV2\FcceEWalletWebsiteV2.TransactionServices\ExportService.cs:line 100
at FcceEwalletWebsiteV2.Components.Pages.TransactionHistory.TransactionDetailsBase.SavePdfAsync() in C:\Users\nitin\source\repos\Fcce\Fcce Ewallet Website\FcceEwalletWebsiteV2\Components\Pages\TransactionHistory\TransactionDetails.razor.cs:line 72
at FcceEwalletWebsiteV2.Components.Pages.TransactionHistory.TransactionDetailsBase.SavePdfAsync() in C:\Users\nitin\source\repos\Fcce\Fcce Ewallet Website\FcceEwalletWebsiteV2\Components\Pages\TransactionHistory\TransactionDetails.razor.cs:line 91
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
2025-02-12 06:52:14.384 +00:00 [ERR] Unhandled exception in circuit 'hXfsQ3i5IOSTMQnO10TqlxNqcIP-q8bOI4vP-WCNW1E'.
Syncfusion.Pdf.PdfException: Failed to launch chromium: Due to insufficient permission unable to launch chromium process for conversion.
---> System.Exception: Failed to launch chromium: Due to insufficient permission unable to launch chromium process for conversion.
at Syncfusion.HtmlConverter.BlinkConverter.BlinkResult(Stream outputStream)
at Syncfusion.HtmlConverter.BlinkConverter.ConvertToPdf(String url, PdfDocument& document)
--- End of inner exception stack trace ---
at Syncfusion.HtmlConverter.BlinkConverter.Convert(String url)
at Syncfusion.HtmlConverter.HtmlToPdfConverter.Convert(String url)
at FcceEWalletWebsiteV2.TransactionServices.ExportService.CreatePdfTransferFundAsync(String senderName, String senderEmail, String recipientName, String recipientEmail, Nullable`1 amount, String date, String transactionId) in C:\Users\nitin\source\repos\Fcce\Fcce Ewallet Website\srcV2\FcceEWalletWebsiteV2.TransactionServices\ExportService.cs:line 100
at FcceEwalletWebsiteV2.Components.Pages.TransactionHistory.TransactionDetailsBase.SavePdfAsync() in C:\Users\nitin\source\repos\Fcce\Fcce Ewallet Website\FcceEwalletWebsiteV2\Components\Pages\TransactionHistory\TransactionDetails.razor.cs:line 72
at FcceEwalletWebsiteV2.Components.Pages.TransactionHistory.TransactionDetailsBase.SavePdfAsync() in C:\Users\nitin\source\repos\Fcce\Fcce Ewallet Website\FcceEwalletWebsiteV2\Components\Pages\TransactionHistory\TransactionDetails.razor.cs:line 91
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
Hi Nitin,
We have reviewed the reported issue on our end, and after further analysis, we were unable to reproduce the problem. The HTML to PDF conversion is working correctly on our side. We suspect that the issue may be related to missing dependencies for Chromium on your system. Since the provided details are not sufficient to reproduce the issue, and it appears that you may have previously used the WebKit rendering engine, we kindly request that you share the following information with us to help us investigate further:
A simplified sample demonstrating the issue, the code snippet that replicates the problem, the input HTML document or URL, the Syncfusion package name and version, your .NET version, and details of your environment. This information will be essential for us to analyze the issue and provide a prompt solution.
Additionally, we recommend checking our troubleshooting section at the following link, as the lack of environment details may be a contributing factor. This guide may help resolve the issue in general:
Please try the troubleshooting steps on your end and let us know the results. If the issue persists, kindly provide the requested details so we can proceed with further investigation.
Regards,
Arumugam M