Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri Oct 14, 2016 5:06 pm

We're using the new plugin to do our exports. There is a possibility that there will be multiple exports happening at one time.
The function that handles the export is called from a thread. We are able to export one file multiple times without issues, but when we attempt to export a different file while another one is being exported, we receive this error:

Message: Thread was being aborted.
Stack Trace: at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.InternalWaitOne(SafeHandle waitableSafeHandle, Int64 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne(Int64 timeout, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne(Int32 millisecondsTimeout, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne()
at Spire.Pdf.HtmlConverter.Qt.Proxy.ConversionService.Convert(String url, String fileName, HTML2PDFOption option, LoadHtmlType urlHtml)
at Spire.Pdf.HtmlConverter.Qt.Proxy.Convert(String url, String fileName, HTML2PDFOption option, LoadHtmlType urlHtml)
at Spire.Pdf.HtmlConverter.Qt.HtmlConverter.Convert(String url, String fileName, Boolean enableJavaScript, Int32 timeout, SizeF pageSize, PdfMargins margins)
at Spire.Pdf.HtmlConverter.Qt.HtmlConverter.Convert(String url, String fileName, Boolean enableJavaScript, Int32 timeout, SizeF pageSize, PdfMargins margins, LoadHtmlType urlHtml)

Is there a proper way to handle threading with this new plugin? Please advise.

PattersonWR
 
Posts: 1
Joined: Tue Jul 26, 2016 8:24 pm

Mon Oct 17, 2016 5:40 am

Dear PattersonWR,

Thanks for your inquiry and sorry for late reply as weekend.
I am afraid that it doesn't support multi-thread. So sorry for inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDF