sungaila / PDFtoImage

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

Add support for UWP arm64 within the unity package #74

Closed Raja-1250 closed 4 months ago

Raja-1250 commented 4 months ago

Kindly include UWP arm64 support in the Unity package. I am currently developing a project designed for Hololens 2, which is of ARM64 architecture. The pdfium and libSkiaSharp libraries are not available for the UWP arm64 target in our Unity package. To address this, I manually incorporated pdfium for the arm64 target from this repository. This modification enabled me to retrieve the total number of pages of the PDF file; however, I encountered errors related to libSkiaSharp with the use of PDFtoImage.Conversion.ToImage since the libSkiaSharp is not present for the arm64 target. Despite my efforts, I was unable to locate this library. I would greatly appreciate it if you could add support for UWP ARM64.

Thank you.

sungaila commented 4 months ago

Hi @Raja-1250,

I'll provide you with a branch to test the arm64 binaries soon.

For testing I used 2022.3 LTS which didn't have arm64 support yet. I hope this can be done without increasing the min supported Unity version.

sungaila commented 4 months ago

@Raja-1250 Please give this one a try. I will merge it into master as soon as you give your OK.

https://github.com/sungaila/PDFtoImage.git?path=etc/UnityPackage#unity-win-arm64
Raja-1250 commented 4 months ago

@sungaila That's greatly appreciated. I'm currently utilizing Unity 2022.3.12f1 for my project. I'll conduct tests within this project initially, and subsequently, I'll evaluate it in Unity 2022.3 LTS to confirm that the minimum supported Unity version doesn't need adjustment.

Raja-1250 commented 4 months ago

@sungaila I've successfully tested arm64 binaries in Unity 2022.3.12f1, and they allow me to load the PDF pages. Transitioning my project to Unity 2022.3 will require some time, I will test and update you in the next couple of days.

sungaila commented 4 months ago

@Raja-1250 Thanks, please reopen this issue if your test fails.

I did some testing myself and 2023.2 seemed to work just fine for both my x64 PC and arm64 notebook.

Raja-1250 commented 4 months ago

@sungaila I've successfully tested arm64 binaries in Unity 2022.3.0, I'm able to load the PDF pages into the Raw Image in my Hololens 2, And this test confirms that we don't need to update the the minimum supported Unity version.

Thanks for your support :)