PDFtoImage icon indicating copy to clipboard operation
PDFtoImage copied to clipboard

Bug for incompatible with libSkiaSharp library.

Open Latisha19 opened this issue 1 year ago • 4 comments

PDFtoImage version

5.0.0

OS

Windows

OS version

Windows 11 23H2

Architecture

x64

Framework

.NET Framework

App framework

No response

Detailed bug report

This may be a bug, or isn't.

To solve an annoying warning in SkiaSharp, I tried to upgrade PDFtoImage from 4.1.1 to 5.0.0, but then I got an error when running Conversion.SavePng(a, b);.

The error shows that: "InnerException {"The version of the native libSkiaSharp library (88.1) is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [116.0, 117.0)."} System.Exception {System.InvalidOperationException}".

Now I will try to degrade back to 4.1.1 to run normally, but I would like to know how to solve this.

Thank you.

Latisha19 avatar Dec 10 '24 03:12 Latisha19

Hi @Latisha19,

thanks for opening this issue! I am not sure what you are trying to do here. PDFtoImage 5.0.0 needs SkiaSharp 3.116.1 (plus their native assets). This should work as is.

If you try to mix and match other versions of SkiaSharp, you will run into issues like this. Which versions are you trying to use?

If possible, only reference PDFtoImage with <PackageReference Include="PDFtoImage" Version="5.0.0" /> and nothing else. This ensures that the correct packages are referenced.

Greetings David

sungaila avatar Dec 10 '24 11:12 sungaila

@Latisha19 Does you project use a packages.config? There is an issue documented here (https://github.com/sungaila/PDFtoImage/issues/108) that might explain your problem.

sungaila avatar Dec 10 '24 16:12 sungaila

@sungaila Thanks for your reply!

I want to use your PDFtoImage tool, SkiaSharp is only for dependency. I got an annoying warning in SkiaSharp 2.88.8, so depending on the issue, I upgraded to a higher version. I made a mistake, sadly until today I found, that I also upgraded PDFtoImage to 5.0.0, so for dependency, I made SkiaSharp upgraded to 3.116.1. This caused the question.

So this bug may be SkiaSharp's, not in your PDFtoImage's. Sorry for my worst investigation.

Latisha19 avatar Dec 11 '24 01:12 Latisha19

@Latisha19 I think your problem is caused by this: https://github.com/mono/SkiaSharp/pull/3112

Once this is fixed, I will release a new version of PDFtoImage and ask you to test it.

sungaila avatar Dec 12 '24 09:12 sungaila

PDFtoImage 5.1.0 should fix this issue.

sungaila avatar May 02 '25 12:05 sungaila