Qt: Could not initialize OLE (error 80010106)
See original GitHub issueI’m working on a ASP.NET Core MVC app and I wanted to use DinkToPdf library to convert Html to PDF. I get this error in the console, when I first access a page that uses the IConverter from the services:
Qt: Could not initialize OLE (error 80010106)
I still get the PDF with no issues. I think the issue is somewhere around calling: new SynchronizedConverter(new PdfTools()) As I have it in the services as a singleton and only called the first time it’s accessed:
services.AddSingleton(typeof(IConverter), new SynchronizedConverter(new PdfTools()));
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:14
Top Results From Across the Web
Could not initialize OLE (error 80010106) - (libwkhtmltox.dll ...
The CreatePdf method its executed two times. In the first time, it executes and show to me in the console, this: Qt: Could...
Read more >C# : Qt: Could not initialize OLE (error 80010106) - YouTube
C# : Qt : Could not initialize OLE ( error 80010106 ) - (libwkhtmltox.dll) on C# To Access My Live Chat Page, On...
Read more >Thread: Could not initialize OLE weirdness
Re: Could not initialize OLE weirdness "QClipboard::setMimeData: Failed to set data on clipboard". Workaround is to make the managed code ...
Read more >Windows: Suggest to implement fallback for clipboard (text) ...
It outputs following errors: Qt: Could not initialize OLE (error 80010106) QClipboard::setMimeData: Failed to set data on clipboard () I ...
Read more >Qt: Could not initialize OLE (error 80010106)
Qt : Could not initialize OLE (error 80010106)
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve just hit this problem too, in an Azure Isolated Functions host project.
I’m pretty sure this issue is due to the worker thread in
SynchronizedConverter
not being STA mode. So I copied theSynchronizedConverter
and made an STA version.Thanks, @distantcam it is work.
only notice for all, To access the
Converter
class, you must inject it, not create a new instance.