Skip to content

fix drawing image in rendering excel/word report in linux#146

Open
zatkhahi wants to merge 2 commits into
lkosson:masterfrom
zatkhahi:master
Open

fix drawing image in rendering excel/word report in linux#146
zatkhahi wants to merge 2 commits into
lkosson:masterfrom
zatkhahi:master

Conversation

@zatkhahi

@zatkhahi zatkhahi commented Jul 9, 2023

Copy link
Copy Markdown

I fix an issue in rendering rdlc containing image in linux systems.

@lkosson

lkosson commented Jul 10, 2023

Copy link
Copy Markdown
Owner

ImageSharp has a license incompatible with Report Viewer - I can't add this dependency.

@amir734jj

Copy link
Copy Markdown

Hi @lkosson

I want to use your library in Linux/Docker, but I understand your concern about merging this PR.

Can we modify this library to make the renderer part configurable so the user can image ImageSharp or whatever?

OR can we use Aspose.Drawing instead?

@lkosson

lkosson commented Nov 8, 2024

Copy link
Copy Markdown
Owner

As far as I'm concerned, you can fork and modify this library as you wish. Just keep in mind that original Report Viewer (on which this project is based) is still owned and licensed by Microsoft.

@vasicvuk

vasicvuk commented Mar 6, 2025

Copy link
Copy Markdown

@lkosson that is fine, but still it would be great for this library to handle Linux rendering well. Maybe using SkiaSharp would be good enough as it is MIT license?

@lkosson

lkosson commented Mar 6, 2025

Copy link
Copy Markdown
Owner

For this particular case, I guess the best resolution would be to just parse jpg/png/gif/bmp header to extract image width and height directly from bytestream. Shouldn't be more than 100 LoC extra and wouldn't need to pull whole image processing library along with it's native components just to read basic metadata.

@vasicvuk

vasicvuk commented Mar 6, 2025

Copy link
Copy Markdown

@lkosson You are right for this case, but i would expect to change whole System.Drawing with SkiaSharp in order to have full Linux compatibility.

@lkosson

lkosson commented Mar 6, 2025

Copy link
Copy Markdown
Owner

.docx renderer don't seem to use System.Drawing for anything else than determining image dimensions. Full Linux compatibility for other renderers (including PDF) is hopeless. Text layout is done using UniScribe, which has no open/free/cross-platform equivalents. Also various parts of renderers depend on GDI, with all its quirks and bugs.

The only way I can think of is to completely rewrite a renderer to output PDF using SkiaSharp. I estimate it would take a good half of the year to get some output and another half to make it look at least similar to current PDF renderer. While that sounds like a lot of fun, I can't afford to focus full-time only on this project.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants