Code Monkey home page Code Monkey logo

Comments (5)

Modest-as avatar Modest-as commented on August 24, 2024

Hi,

Yes, you are correct, the example there uses System.Drawing.Common and you would need to install dependencies on your azure environment if you want to use it. I am currently on holiday so will not get around to implementing anything in SkiaSharp for a few weeks at least. If you are in a hurry, the image format that docnet returns is a BGRA raw byte array, I have found this helpful github issue that will help you if you want to try and do it yourself.

from docnet.

kinhoon avatar kinhoon commented on August 24, 2024

Hi,

I tested further and found that GetText() function is also not working in Azure Web App.

I checked further and realized that the pdfium.dll dependency for Docnet.dll actually linked to gdi32.dll. I read from the following link that Azure sandbox actually block any dependency to GDI calls
https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox

If this is the case, it could simply mean we will not be able to use Docnet in Azure Web App. Though it works perfectly fine in IIS deployment locally.

from docnet.

Modest-as avatar Modest-as commented on August 24, 2024

Yes, that is correct, PDFium uses GDI in a couple of places when running on Windows. This, however, is not an issue on Linux since pdfium.so doesn't need GDI. If you can't run on Linux or use GDI, unfortunately, there are only two alternatives:

  1. Try to compile PDFium without GDI dependencies
  2. Try to find some other library that doesn't use GDI

Hope this helps.

Thanks,

Modestas

from docnet.

kinhoon avatar kinhoon commented on August 24, 2024

It seems it is quite impossible to remove GDI dependencies from PDFium. Seems the only way is to find another library. :-(

Thanks.

from docnet.

Modest-as avatar Modest-as commented on August 24, 2024

I will be closing this feature request since we can't realistically expect to remove GDI dependencies from windows build of PDFium. Suggested workaround if running on Azure and the project supports netstandard is to try and run on Linux.

from docnet.

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.