I'm worried about the API when using it in a multi threaded web environment.
To set the HtmlPDfOptions you need to set the following for example:
Code: C#
HtmlToPdf.Options.HeaderHtmlFormat = "test";
HtmlToPdfResult htmlToPdfResult = HtmlToPdf.ConvertHtml(HtmlBody, pdfDocument);
yet, at the same time, on a different thread, I'm also converting html to pdf where no header is applicable.
I would expect more something like this:
Code: C#
HtmlToPdfOptions options = new HtmlToPdfOptions();
options.HeaderHtmlFormat = "test";
PdfDocument pdfDocument = new PdfDocument(options); //<-- not possible
HtmlToPdfResult htmlToPdfResult = HtmlToPdf.ConvertHtml(HtmlBody, pdfDocument);
or like setting the info:
Code: C#
PdfDocument pdfDocument = new PdfDocument();
pdfDocument.Info.Author = "Me";
pdfDocument.Options.HeaderHtmlFormat = "test"; //<-- not possible
HtmlToPdfResult htmlToPdfResult = HtmlToPdf.ConvertHtml(HtmlBody, pdfDocument);
or
Code: C#
HtmlToPdfResult result = HtmlToPdf.ConvertHtml(htmlBod, pdfdocument, options) //<-- not possible
Can you please advise why setting the options happen in a static way ?
Thx