You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue while using the library : when I tried to create a PDFDocument instance for a file without a password, my first attempt was to call PDFDocument(filePath: path, password: nil), which caused my app to crash with mysterious error messages.
I managed to fixed it by calling PDFDocument(filePath: path, password: "").
This should be either stated clearly in the docs (maybe I've missed it?) or fixed in the code.
Cheers!
The text was updated successfully, but these errors were encountered:
@CKzu that is very strange, the default implementation of PDFDocument without a password (PDFDocument(filePath: path)) simply calls PDFDocument(filePath: path, password: nil). So nil should not be giving you any issues (in theory). Can you paste the crash log?
Additionally, you can take a look here at how opening a PDF is handled. The only time it will send you a CGPDFDocumentError is if the file is encrypted and no password is provided.
Hi and first of all thanks for the work!
I encountered an issue while using the library : when I tried to create a PDFDocument instance for a file without a password, my first attempt was to call
PDFDocument(filePath: path, password: nil)
, which caused my app to crash with mysterious error messages.I managed to fixed it by calling
PDFDocument(filePath: path, password: "")
.This should be either stated clearly in the docs (maybe I've missed it?) or fixed in the code.
Cheers!
The text was updated successfully, but these errors were encountered: