Skip to main content
Participant
November 21, 2016
Question

Taskkill specific PDF file without closing other PDFs open

  • November 21, 2016
  • 2 replies
  • 4499 views

Hello.

I am trying to close a PDF file (under Win10) using CMD using TASKKILL [/S system [/U username [/P [password]]]] { [/FI filter] [/PID processid | /IM imagename] } .  I am using Adobe Reader DC.

It works fine.  However, when I have more than 1 PDFs open, it will close all documents.

So my question is:  Is there a way to specifically close a "filename.PDF" document only without closing other PDFs that are open?

I appreciate any help.  Thank you.

    This topic has been closed for replies.

    2 replies

    Participant
    November 21, 2016

    For those interested, I found a work around by using /n to open new instance of Adobe Reader. 

    Sample command:  <Acrobat path> /n /A "<parameter>=<value>" "<PDF path>"

    Legend
    November 21, 2016

    There is a shared task for all PDFs. Often more than one task, but still shared. There is an API to Acrobat, but I don't think you have one to Reader.

    Participant
    November 21, 2016

    Thank you for a speedy reply.

    Reason I needed it was because I am using <Acrobat path> /A "<parameter>=<value>" "<PDF path>" from CMD to open a PDF to a certain page number.  However, once opened, if user does not close the PDF, and the above command is sent again with a different page number, then it just brings up the already opened PDF at whatever page was opened previously.  That is why I was trying to use taskkill to close it before opening it again to the specified page.

    If you know of another way, it would be appreciated.

    Thanks so much!