readium / swift-toolkit

A toolkit for ebooks, audiobooks and comics written in Swift
https://readium.org/mobile/
BSD 3-Clause "New" or "Revised" License
251 stars 100 forks source link

Password Protected PDF #162

Open JacobDaneh opened 2 years ago

JacobDaneh commented 2 years ago

Hi there, How could I open password protected pdf files? I could not found onAskCredentials() callback as said in this proposal:

https://readium.org/architecture/proposals/006-content-protection.html

mickael-menu commented 2 years ago

Readium Swift doesn't support password-protected PDF yet. But if it's a pressing issue for you, we will welcome a contribution! I think it's a matter of passing down the password to the underlying APIs (CGPDF and PDFKit).

The onAskCredentials() was not implemented and I'm not sure we will keep this API in the end, but a minimal approach would be:

JacobDaneh commented 2 years ago

Thank you for your response. Unfortunately I don't have enough time to contribute now, but I will contribute to the readium project as soon as possible. Readium is one of the best projects I have ever seen.

Regards