Cannot save modified document on Android
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qpdfview |
Fix Released
|
Low
|
Adam Reichold |
Bug Description
Running Debian in proot environment on Termux for Android 11 (aarch64). I open a PDF form which allows for editing, make changes, then attempt to save them. I get an error box labeled "Warning" which says "Could not refresh '/home/
When run from the terminal, I get the following output:
qt.qpa.xcb: XKeyboard extension not present on the X server
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-
Unknown MIME type: "application/
"Could not match file type of 'form_2241.pdf'!"
I have checked permissions (trying various modes including 777) and running as root, but getting the same error. Editing the same file on an Ubuntu 22.04 VPS produces no problems.
Changed in qpdfview: | |
status: | New → Confirmed |
importance: | Undecided → Low |
Changed in qpdfview: | |
status: | Fix Committed → Fix Released |
Hello,
PDF documents are not modified in place but rather the new version that includes that changes existing only in memory are written out to a temporary file. After that, the original file is overwritten (so opened for writing and truncated) with the contents of that temporary file. (This applies both to "Save" as well as "Save as", only the target paths differ.)
The failure mode you describe suggests that either writing out data to the temporary file fails silently or that reading the data back from the temporary file is unsuccessful. Since both explanations would require that errors not reported by the file system or ignored within qpdfview and or Poppler (the underlying PDF engine), I fear that this could only be resolved by stracing the qpdfview process to figure out which system calls yield errors.
Regards,
Adam