Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Taskkill specific PDF file without closing other PDFs open

Community Beginner ,
Nov 21, 2016 Nov 21, 2016

Copy link to clipboard

Copied

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.

Views

4.1K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 21, 2016 Nov 21, 2016

Copy link to clipboard

Copied

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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 21, 2016 Nov 21, 2016

Copy link to clipboard

Copied

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!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 21, 2016 Nov 21, 2016

Copy link to clipboard

Copied

LATEST

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>"

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines