sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
13.6k stars 1.73k forks source link

free *.pdf or close of a *.pdf with ExternalViewers #3853

Open Aliaksandr3by opened 11 months ago

Aliaksandr3by commented 11 months ago

If I use e.g. PdfDjvuBookmarker, Sumantra have been using a *.pdf, that don't permit to save the pdf.

[
    CommandLine = "C:\Program Files (x86)\Pdf & Djvu Bookmarker\PdfDjvuBookmarker.exe" "%1"
    Name = Pdf&Djvu Bookmarker
    Filter = *.*

    some THing Like :

AutoClose = true AutoFreeing = true
]

s

GitHubRulesOK commented 11 months ago

Hmm Windows holds file handles open during usage so other apps cannot delete or rename files while another app is using them and only on application closer are they normally freed by file system.

SumatraPDF intentionally works with some locked files (especially those PDF under 32 MB) so that other file editors like PDFLaTeX can change them without finding SumatraPDF usage has been locked by the System. This means some files can behave different to others but the file system still be monitoring files and folders in general.

So I always suggest try NOT to delete (or use SumatraPDF rename function) while the files are in use. SumatraPDF can be used to write a list of files to delete during usage then user run that delete list on closure

see https://github.com/sumatrapdfreader/sumatrapdf/issues/2275#issuecomment-1005687376 and https://github.com/sumatrapdfreader/sumatrapdf/issues/2246#issuecomment-967193187

Aliaksandr3by commented 11 months ago

don't the sumantra have possibility to close pdf?

GitHubRulesOK commented 11 months ago

It depends how the system allows active file or active folder manipulation so any file that is active is blocked by Windows image

I dont use bookmarker but suspect it could be holding a list of files open, you need to explain exactly a sequence where file handling is not functioning the way windows would allow changes.