1

I am working on something questionably useful (because better executions exist) which is a Sublime Text 3 PDFLaTeX build system with preview. I want to open files in Acrobat Reader, and so far all is good. But I need to be able to close these files too, or else they will be locked and PDFLaTeX won't be able to modify them and fail on rebuild. And I need to be able to do that from the command line.

I see no reason one couldn't do that, based on the fact that I can easily go into Task Manager and kill one of the subtasks labeled with filenames, which will close that file and that file only. It looks like this.

However, I see no way to do this from cmd. taskkill doesn't seem to provide any option for that, but it looks like it should be possible.

4
  • Is the problem to "close specific file" or just "close current tab"? The second one can be done by sending Ctrl-W to Reader. Note: I don't get a separate process in Task Manager per each open file in Acrobat Reader.
    – harrymc
    Commented Feb 17, 2021 at 20:13
  • Thank you for the reply! The problem was to close a specific file, but thank you for mentioning that you can apparently send some sort of Ctrl+W signal to a process. Also thank you for mentioning that you do not get subprocesses for separate files in Task Manager. This is all very insightful. Regardless, I resolved to using Evince instead, although it isn't commonly used on Win10. Works like a charm, though!
    – Maurycyt
    Commented Feb 18, 2021 at 21:04
  • You pdf file, the full path is known?
    – Io-oI
    Commented Feb 24, 2021 at 15:02
  • It is. Does that help?
    – Maurycyt
    Commented Feb 25, 2021 at 16:04

0

You must log in to answer this question.

Browse other questions tagged .