ststeiger / PdfSharpCore

Port of the PdfSharp library to .NET Core - largely removed GDI+ (only missing GetFontData - which can be replaced with freetype2)
Other
1.06k stars 239 forks source link

Missing Method Exception #399

Closed TonyValenti closed 11 months ago

TonyValenti commented 11 months ago

Hi @ststeiger - Can you please make this compatible with the latest version of ImageSharp?

I am currently getting this error:

System.MissingMethodException: 'Method not found: 'SixLabors.ImageSharp.Image`1<!!0> SixLabors.ImageSharp.Image.Load(System.IO.Stream, SixLabors.ImageSharp.Formats.IImageFormat ByRef)'.'

I have the following packages installed in my project:

        <PackageReference Include="SixLabors.ImageSharp" Version="3.0.2" />
        <PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.0.0" />

This is high priority for us.

Thank you for your help!

TonyValenti commented 11 months ago

@startnow65 - can you merge and release an update?

startnow65 commented 11 months ago

@startnow65 - can you merge and release an update?

No, I cannot merge/approve to master.

TonyValenti commented 11 months ago

Oh, do you know anyone who can? This is urgent for use and I'm not sure how to contact @ststeiger .

startnow65 commented 11 months ago

No, I don't know of anyone else

igrek-cvna commented 11 months ago

We have the exact problem with XImage.FromStream (Assembly PdfSharpCore, Version=1.3.60.0)

<TargetFramework>net7.0</TargetFramework>
<PackageReference Include="PdfSharpCore" Version="1.3.60" />
----

using PdfSharpCore.Drawing;

                    outputStream.Position = 0;
                    XImage ximage = XImage.FromStream((() => outputStream));
LewxX commented 11 months ago

It looks like only @ststeiger has maintainer rights on this repo 😕, and he only seams to come here once a month or so.

A possible workaround is to downgrade your ImageSharp version (if that's even possible in your environment): <!-- do not update SixLabors.ImageSharp! PdfSharpCore need version 2.* :( --> <PackageReference Include="SixLabors.ImageSharp" Version="2.*" />

ststeiger commented 11 months ago

@TonyValenti: No I cannot, and for legal reasons. The new license of ImageSharp would create problems to existing users. Also, why remove old framework versions when everything works fine with them ?

JimBobSquarePants commented 8 months ago

The new license of ImageSharp would create problems to existing users.

What legal problems are these? The license terms for ImageSharp are clear. As long as downstream consumers use the version bundled with PdfSharpCore as a transitive reference they are subject to the Apache 2.0 License.

https://github.com/SixLabors/ImageSharp/blob/f9268224253aa2cbfaee8d8acfdf8c33c8ad98c8/LICENSE#L33-L40

Your readme also references this?

https://github.com/ststeiger/PdfSharpCore/blob/cdf089b6c4d6b379aead95f463911dd009ae194e/README.md#L57-L60

TonyValenti commented 8 months ago

Hi @ststeiger - JimBobSquarePants is the author and maintainer of ImageSharp and his post clearly indicates that there aren't any issues here.

Can you please merge the PR?