c# - Ghostscript.NET Multithreading Issue -
c# - Ghostscript.NET Multithreading Issue -
the longest part of monthly process run automated slicing , conversion of pdfs images. each pdf read in, converted 3 different pdfs, , 3 converted images placed in e-mails customers. pdfs unique per-customer, , send monthly pdf @ to the lowest degree 15,000 (frequently more 22k) customers.
our pdf generation , slicing multithreaded, i've been looking parallelizing remaining bits of it.
to end, have converted our process utilize ghostscript.net, purports library supports parallelizing ghostscript.
to end, wrapped code in parallel.foreach() loop, each iteration through loop works on different initial pdf:
ghostscriptversioninfo gsversioninfo = ghostscriptversioninfo.getlastinstalledversion(ghostscriptlicense.gpl | ghostscriptlicense.afpl, ghostscriptlicense.gpl); ghostscriptprocessor processor = null; seek { //sargs array of arguments ghostscript processor = new ghostscriptprocessor(gsversioninfo, true); processor.startprocessing(sargs, new consolestdio(true,false,true)); while (processor.isrunning) { thread.sleep(100); } }
when run above code , forcefulness parallel.foreach utilize 1 thread (disabling parallelization) runs used , generates files correctly. if utilize 5 degrees of parallelization, begins throwing errors. these errors vary, tend indicate malformed input pdf files, making me think ghostscript processors aren't threadsafe, , stepping on each other's inputs.
how correctly utilize ghostscript.net run multiple instances of ghostscript, on different files, simultaneously?
i using ghostscript.net multi-threading. code shared above should within parallel.for loop. yes entire code means starting
ghostscriptversioninfo gsversioninfo = ghostscriptversioninfo.getlastinstalledversion(ghostscriptlicense.gpl | ghostscriptlicense.afpl, ghostscriptlicense.gpl);
till end , should work. @kens mentioned above, each multi-threaded process should utilize different instance of ghostscriptprocessor
.
c# ghostscript pdf-conversion ghostscript.net
C - Ghostscript.Net Multithreading Issue - >>>>> Download Now
ReplyDelete>>>>> Download Full
C - Ghostscript.Net Multithreading Issue - >>>>> Download LINK
>>>>> Download Now
C - Ghostscript.Net Multithreading Issue - >>>>> Download Full
>>>>> Download LINK V7