I modified the print_annotations example as follows to handle PDF files that have been encrypted with an empty password:
Ok(mut doc) => {
if doc.is_encrypted() {
doc.decrypt("");
}
let _ = handle_pdf_page(doc);
}
However, despite the decryption working for other parts of the PDF. It does not seem to decrypt the URI in links. They still end up seemingly garbled, whereas they are supposed to be a valid UTF-8 (?) string (and I confirmed that the links work in mupdf), which is why I am assuming that they didn't get decrypted.
I modified the print_annotations example as follows to handle PDF files that have been encrypted with an empty password:
However, despite the decryption working for other parts of the PDF. It does not seem to decrypt the URI in links. They still end up seemingly garbled, whereas they are supposed to be a valid UTF-8 (?) string (and I confirmed that the links work in mupdf), which is why I am assuming that they didn't get decrypted.