I am using okular quite a lot and observed for some time a strange behaviour (I’m not sure if it’s good or bad, if it’s afeature or a bug or just a settings issue). :
I use to save pdf files in a particular folder for processing with a DMS. Let’s call it ~/DMS.
When I download a pdf using firefox and open it directly with Okular, I want to save it from within Okular to the said folder. I click on “Save as…”, because usually the file would be stored in the tmp-folder, where I don’t want to save it permanently. Then the folder ~/DMS is preselected, and the file is already saved there. I still overwrite it, because I fear it could be deleted (as being an temporary file).
Sometimes, however, a file thus opened would be saved to the tmp folder, hence I have to chose the ~/DMS folder in order to save it in the right place.
I do not know how this behavior started, and I wonder if it’s a feature or a bug. I didn’t find anything in the settings. I would love to rely on the file being saved in the desired folder, but since sometimes it doesn’t work, I always have to go through the process described above.
Does anyone know if there is a way to influence that behavior?
If I understand your problem correctly, sometimes your file is downloaded to ~/DMS and other times it’s downloaded to some other location, perhaps the downloads folder set in your browser?
If so, it’s not an Okular issue as it occurs without Okular involvement - it’s the download location that is the issue.
I’ve noticed a similar occurrence with Firefox and LibreWolf; despite having a download location set, for some PDF files it seems to remember the location I saved them last and puts them there; the weird thing is it knows what the document is (perhaps by url?). For example, my electricity, gas, and water invoices all go to their relevant folders not a common location. If I change the save folder, it will want to save it there again next time.
At least in my case, it’s the in browser PDF viewer but I can’t find where this behaviour would be configured if it is even possible.
EDIT: I’ve investigated this further and Firefox does indeed remember last used directory per URI.
`If passed a URI, the last used directory is also stored with that URI in the` content preferences database. This can be disabled by setting the pref` browser.download.lastDir.savePerSite to false.`
From DownloadLastDir.sys.mjs - mozsearch
You can disable the feature to remember a host based download directory by creating a new Boolean pref in about:config with the name browser.download.lastDir.savePerSite pref and set its value to false.
Well, thank you very much for your reply and research! I actually am ok with the files being downloaded to ~/DMS, but not long ago, if I select “open in Okular”, there was nothing saved on the hard disk, I always had to chose the folder where to put it from within Okular. Firefox (my standard browser) saved a temporary file in the tmp folder, where files will be deleted when they aren’t used any longer. Now it seems erratic to me: sometimes it lands in the ~/DMS folder and stays there permanently, but sometimes it appears to be saved in the tmp-folder, where it doesn’t stay permanently.
But I understand that this is an issue of Firefox and not of Ocular. Thanks for pointing that out!
Edit:
I just checked my settings and found that for pdf files, there are two settings:
- ask for action (which opens a box with the options save, open with or …)
- save
I guess Firefox executes both these actions. I must have set that at some time, and forgot about it. Getting older…
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.