Error from DynamicPDF.Converter

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Converter for .NET (v3)  /  Error from DynamicPDF.Converter

DynamicPDF Converter for .NET (v3) Forum

 Jan 18 2021 6:15 AM
Hi.

I'm using the DynamicPDF Converter (HTML to PDF) running in an AWS.Lambda function using .NET Core 3.1.
The HTML is generated using Razor pages.
The converter works fine, and even renders javascript generated charts correctly, however I always get some errors in the log output I don't understand.
The errors comes from the Converter.Convert(html, new Uri(resourcePath), options) method.

I use chromium as renderer with the following Process args: Converter.ChromiumProcessArgs += " --no-sandbox --headless --disable-gpu --disable-dev-shm-usage --single-process --no-zygote";

The errors I get (usally 6 lines) is:
[0118/110133.241749:INFO:CONSOLE(3)] "Uncaught ReferenceError: addRow is not defined", source: file:///opt/tmp/

The /opt/tmp directory is where the css and script folder is located.

I have tried several different solutions to fix this error, with no luck.

I appreciate any help with this, even if the solution creates PDF documents correctly.

Christer.
 Jan 18 2021 9:50 AM
Posted by a ceTe Software moderator
Hi Christer,

Currently DynamicPDF Converter for .NET will not work in AWS Lambda. We hope to support this in the futures and will post an update once this is supported.

Thanks,
ceTe Software Support Team
 Jan 19 2021 3:24 AM
Hi, thank you for you response.

Well, the converter works fine, and the errors comes from the Chromium browser, and has nothing to do with AWS Lambda.
I get the same errors if I Dockerise the solution and run it in a Kubernetes container.


Christer.
 Jan 21 2021 11:58 AM
Posted by a ceTe Software moderator
Hello Christer,

We looked into the error details again. It seems to be related to CSS or JavaScript. Please send over the following information to support@dynamicpdf.com so we can look into it further.

1.        Full details on the environment (operating system, platform, etc..) on which you are trying to deploy and run your application.
2.        Code sample or simple application that recreates the error on our end.
3.        Sample HTML file to recreate the error.
4.        Steps needed to recreate the error.
5.        Exact version and build number of the DynamicPDF Converter product DLL file used in your application. You can find this information in the DLL references properties (Version and Description fields) in Visual Studio.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 8:16 AM.