@pdftron/webviewer : 11.0.0
I am working on Ionic 7 app using Capacitor 5 and PDFTron for PDF file preview. I am encountering an issue where the @capacitor/filesystem
plugin’s readFile
function works when you read a file for base64 encoding, but stops responding after using PDFTron to preview the file.
The Problem:
-
Base64 Encoding with Filesystem: I am using the
@capacitor/filesystem
plugin to read a file and convert it into a base64 string for previewing it with PDFTron. This step works fine, and I get the base64 encoded string. -
PDFTron Preview: Once I pass the base64 string to PDFTron for previewing, things seem to work for the preview, but when you try to access the file again using the
@capacitor/filesystem
plugin (e.g., to read it again or modify it), the call toreadFile
does not respond. -
When PDFTron code is removed: If I remove the PDFTron-related code, the call to
readFile
works again, meaning that the issue appears to be tied to using PDFTron for previewing the file.