sumatrapdf icon indicating copy to clipboard operation
sumatrapdf copied to clipboard

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

Open Aliaksandr3by opened this issue 2 years ago • 3 comments

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

Aliaksandr3by avatar Nov 06 '23 08:11 Aliaksandr3by

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

GitHubRulesOK avatar Nov 06 '23 09:11 GitHubRulesOK

don't the sumantra have possibility to close pdf?

Aliaksandr3by avatar Nov 06 '23 09:11 Aliaksandr3by

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.

GitHubRulesOK avatar Nov 06 '23 09:11 GitHubRulesOK