PDFtoImage icon indicating copy to clipboard operation
PDFtoImage copied to clipboard

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

Open Auto72 opened this issue 1 year ago • 9 comments

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?

Auto72 avatar Nov 30 '23 11:11 Auto72

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.)

sungaila avatar Dec 01 '23 12:12 sungaila

I tried and it doesn't work.

Auto72 avatar Dec 04 '23 10:12 Auto72

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

Auto72 avatar Dec 04 '23 14:12 Auto72

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.

sungaila avatar Dec 06 '23 08:12 sungaila

I can try see if I can help, I have a Mac and iOS.. I also have someone that knows a little bit about skia :)

rmarinho avatar Aug 30 '24 01:08 rmarinho

@rmarinho Glad to hear that! We need someone that knows how to build Mac Catalyst binaries out of the pdfium code.

If you would like to take up the challenge, please take a look at this issue: https://github.com/bblanchon/pdfium-binaries/issues/168

sungaila avatar Aug 30 '24 07:08 sungaila