Windows.Data.Pdf.PdfDocument Crash with file size greater than 2GB
Same issue as here (no replies there, it's an old thread)
https://zcusa.951200.xyz/en-us/answers/questions/248422/windows-data-pdf-pdfdocument-crash
My notes:
Crash is not catchable which makes it really hard to find reason for issue or workaround.
I've tried the file in the official demo sample app and it crashes too. The file can be opened in other PDF software (including Edge - although slowly - which is funny because I think it uses the Windows.Data.Pdf library as well if I'm correct?)
After a bit more research, it seems the size is indeed what makes it crash. Another PDF lib I tried crashed similarly when the stream length exceeded Int32.MaxValue. The exception was catchable in this one so I could get a proper error message.
My laptop has 16GB of ram (nothing else running really) and 140GB free SSD space so I hope that's not the issue.
I can provide a storage link to a crashing file if necessary.
Same error on Windows 10 and Windows 11, both 64 bits, app is 64 bits.