tuespetre / TuesPechkin

A .NET wrapper for the wkhtmltopdf library with an object-oriented API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parallel Run

mramirezfalcon opened this issue · comments

Hello, we have an App deployed on IIS, and we need to generate many reports to PDF. TuesPechkin is performing well and I'm using as suggested :

public static readonly IConverter _pdfConverter = new ThreadSafeConverter( new RemotingToolset<PdfToolset>( new Win64EmbeddedDeployment( new TempFolderDeployment())));
But the conversions gets queued for a long PDF reports of many rows. So if I have a lot of concurrency in the app the generated reports must wait the long running conversion to finish, ans that's not a desired behavior. So I'm asking if this is a designed behavior and if there is another option. We have a lot of concurrency and big reports, some times thousands of html rows.

ThankYou!

commented

Guess can use List to manage your own thread?

I was able to solve this problem by creating a dedicated console app that generated my pdf using TuesPenchkin. I just called it using Process.Start() from the web app and passed params containing the destination file path where the pdf should be saved. Once pdf was generated, my web app could then get the file from that path. It works pretty well.