[javascript] find current active document SOLVED
Moderators: Daniel - PDF-XChange, PDF-XChange Support, Vasyl - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
[javascript] find current active document
The app.activeDocs() method returns a list of active documents, but is there a way for a function to know which of them is currently in front? The only way I've found so far is to pass this to the function when calling it. Is there a property or flag somewhere that gives it?
- Roman - Tracker Supp
- Site Admin
- Posts: 331
- Joined: Sun Nov 21, 2004 3:19 pm
Re: [javascript] find current active document SOLVED
Hi Mathew,
To get the foreground document when it cannot be referenced as this, you can use the app.doc property.
To get the foreground document when it cannot be referenced as this, you can use the app.doc property.
Re: [javascript] find current active document
Thank you, Roman! I did not know that property of app existed.
- Daniel - PDF-XChange
- Site Admin
- Posts: 10935
- Joined: Wed Jan 03, 2018 6:52 pm
[javascript] find current active document

Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
- Roman - Tracker Supp
- Site Admin
- Posts: 331
- Joined: Sun Nov 21, 2004 3:19 pm
Re: [javascript] find current active document
app.doc is an undocumented property, however Adobe Acrobat implements it as well.