sungaila / PDFtoImage

A .NET library to render PDF files into images.
https://www.sungaila.de/PDFtoImage/
MIT License
144 stars 14 forks source link

PDFToImage doesn't work on a MAUI App that runs on iOS or MacCatalyst #52

Open Auto72 opened 7 months ago

Auto72 commented 7 months ago

Detailed feature request

I tried a MAUI project and it doesn't work on iOS and MacCatalyst , because the PDFium library is missing.

Here I found Pre-compiled binaries of PDFium:

https://github.com/bblanchon/pdfium-binaries

Can you include the iOS Pre-compiled binary in the PDFtoImage library, so that we can use it on iOS also?

sungaila commented 7 months ago

Hi @Auto72, could you please add bblanchon.PDFium.macOS and bblanchon.PDFium.iOS to your MAUI project and tell me, if it works for macOS and iOS?

I don't have a Mac to test this myself.

(Also this is a duplicate of #42.)

Auto72 commented 7 months ago

I tried and it doesn't work.

Auto72 commented 7 months ago

I also tried to add the following NuGet packages to the PDFToImage project,

"bblanchon.PDFium.iOS" "SkiaSharp.NativeAssets.iOS"

Adding the Target frameworks:

"net7.0-ios", "net8.0-ios".

but still with no luck :-( When I run the MAUI App on iOS, I can see the .NET splash screen for few moments and then the App crashes.

1

2

sungaila commented 7 months ago

Hi @Auto72, third party libraries (such as pdfium) must be repackaged and signed for iOS/Catalyst. See also What are Frameworks? or All dynamic libraries must be frameworks on iOS.

SkiaSharp does this already but bblanchon.PDFium provides dylibs only. If you are able to help, please head over to that repo.