Hi Patryk,
Thank you for using Syncfusion products.
We have tried to reproduce the reported exception on our end, but it is working properly. We have created a sample and convert the HTML string to a PDF document, it generates a PDF document without any exception. We were unable to reproduce the exception and we have shared the sample for your reference. Kindly please run the sample on your end and let us know the result.
Please refer to the below links for preserving resources (CSS/Images/Scripts etc.,) about HTML string to PDF conversion.
Note: For converting HTML string to PDF, we have to specify the base URL (path of the resources) to load the external images/scripts/styles used in the HTML string. So, please make sure that the provided path (Base URL) contains (styles, scripts, images) used in the HTML string.
If still, you are facing the same exception, kindly provide more details such as a modified sample, product version, environment details (OS, Bit version, RAM, etc) to check the issue on our end. So, that it will be helpful for us to analyze and assist you further on this.
Regards,
Gowthamraj K