Giter Site home page Giter Site logo

Unable to read DLL about dinktopdf HOT 6 CLOSED

rdvojmoc avatar rdvojmoc commented on May 14, 2024
Unable to read DLL

from dinktopdf.

Comments (6)

rdvojmoc avatar rdvojmoc commented on May 14, 2024 1
  • If your OS is 64 bit then this is correct behavior. If you want to test with 32 bit library you must run it in 32 bit environment.

  • In thread safe console did you get expected PDF at the end?

  • This is right route to get PDF: http://localhost:5000/api/convert . Tested it again at my end without problems.

  • I added Kestrel server profile to launchSettings.json:

    "Kestrel": {
      "commandName": "Project",
      "launchUrl": "pdf",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "http://localhost:5000"
    }

Select Kestrel profile in VS:
image
In browser go to route http://localhost:5000/pdf. Now you should get expected result.
The reason that I added Kestrel profile is because this library is not compatible with IIS. Problem with IIS is how IIS manage app pools. To resolve that issue Remoting tools should be used but they are not supported in .NET Core.

You see changes that i made to your project here.

from dinktopdf.

rdvojmoc avatar rdvojmoc commented on May 14, 2024

Hi, yes it should be in the folder where .csproj is.
Did you try any provided example code?
Can you make repro project to test in on my machine?

from dinktopdf.

wmeints avatar wmeints commented on May 14, 2024

Be sure to use the right dll also, I had issues on Windows because I used the x86 version instead of the x64 which is what my system actually required.

from dinktopdf.

rdvojmoc avatar rdvojmoc commented on May 14, 2024

In case of wrong version, BadImageFormatException should be thrown.

from dinktopdf.

bmikkelsen22 avatar bmikkelsen22 commented on May 14, 2024
  • I got your TestConsoleApp to work, but only with the 64 bit library.
  • Your thread safe console app printed this out:
Qt: Could not initialize OLE (error 80010106)
QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.
QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.
  • The test web app added the service, but the controller never got called. I think that was an issue with routing. I tried going to localhost:<port>/api/convert/get, localhost:<port>/api/convert/, localhost:<port>/convert/get, and a few others

Here's a repo with my test project, which I'm still having troubles with. https://github.com/bmikkelsen22/HtmlToPdf

from dinktopdf.

bmikkelsen22 avatar bmikkelsen22 commented on May 14, 2024

Thanks for the quick response! It's working on my machine as well with Kestrel.

from dinktopdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.