Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPOI requires GDI+ dependency even on sheet creation without using column auto-sizing #372

Closed
msvprogs opened this issue Jun 10, 2020 · 5 comments

Comments

@msvprogs
Copy link

This is critical for Linux/Docker-hosted services. Magic with libgdiplus package installation didn't work in my case.

Possible solution: do not create AutoSizeColumnTracker in the constructor but move it to Lazy<AutoSizeColumnTracker> so it will be created on demand. My solution: msvprogs@71788be

@tonyqus
Copy link
Member

tonyqus commented Jun 14, 2020

But why do you want to totally get rid of libgdiplus?

@msvprogs
Copy link
Author

I didn't say so :) But let's only use it on explicit calls of auto-sizing methods or properties. Current version of sheet constructor triggers some static initialization method of GDI+, which causes an exception on Linux. With Lazy<> problem is gone (GDI+ is called only when using auto-sizing methods).

@tonyqus
Copy link
Member

tonyqus commented Jun 25, 2020

mmm....looks to be a good idea. Can you create a PR for this?

@tonyqus tonyqus added this to the NPOI 2.5.2 milestone Jun 25, 2020
@msvprogs
Copy link
Author

@tonyqus
Copy link
Member

tonyqus commented Jul 10, 2020

code merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants