Open PDF viewer on a defined directory

The PDF-XChange Viewer for End Users
+++ FREE +++

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

R.Janssen
User
Posts: 36
Joined: Thu Jun 17, 2010 3:30 pm

Open PDF viewer on a defined directory

Post by R.Janssen »

I am trying to create a shortcut that will launch PDF Xchange viewer and presents the files in a certain directory to the user.

What I already tried is to pass the name of the directory as a command parameter, and to set the desired directory as the working directory for the application (both options, in fact).
But it remains the same: the directory shown when files are opened is the "My documents" directory for the user, or the last directory where this user has last opened files in the past.

What I would like to have is an icon that points to a directory where many documents are placed, and the user can select a document from this directory without having to navigate to the (very long) path of that directory beforehand.

Is this possible?
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7444
Joined: Wed Mar 25, 2009 10:37 pm

Re: Open PDF viewer on a defined directory

Post by Paul - PDF-XChange »

Hi R.Janssen,
What I would like to have is an icon that points to a directory where many documents are placed, and the user can select a document from this directory without having to navigate to the (very long) path of that directory beforehand.
By shortcut I assume you menu in Windows... Would this not simply be a desktop (or other) shortcut to your directory? A user double clicks the shortcut and the folder opens in Explorer where they can select the files to open...

I'm not sure I understand where calling the Viewer comes in. I must be missing something.
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
R.Janssen
User
Posts: 36
Joined: Thu Jun 17, 2010 3:30 pm

Re: Open PDF viewer on a defined directory

Post by R.Janssen »

This is a workaround that I am using now, but that opens the explorer instead of the PDF viewer.
Then the user can open a single document from that explorer, the viewer opens with that
document, but when the user then clicks the "open" button he gets an open dialog for
the directory where he last explicitly opened a document, not the directory where the current
document lives.

What we have is a folder where a series of copies of printed invoices is filed as PDF files,
and the users need to find something by opening a PDF then looking in there, and maybe opening
the previous or next file when the data they are looking for is not in that particular file.

The viewer file open dialog is perfectly OK for opening the files (with preview), but I am trying to
find a way to launch the viewer in such a way that the open dialog shows the files from the
particular directory automatically, without having to nagivate to that location.

Where does the viewer store the name of the directory to show when the Open dialog is shown?
I have searched the registry but I cannot locate it. I see the recently opened files list, but
even when the list is cleared in the viewer, it still remembers what directory to show...


Rob
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19930
Joined: Mon Jan 12, 2009 8:07 am

Re: Open PDF viewer on a defined directory

Post by Stefan - PDF-XChange »

Hello Rob,

The File Open window is managed by windows I am afraid, so if there is a registry setting it will be hidden somewhere in an unexpected place.
Instead of writing the patch to change to that folder, and then open the Viewer, you could just launch the Viewer and pass as parameters all the files you want to open.

Taken from the command line parameters list in the Viewer manual:
--------------------------------
filename1, filename2, … filenameN
--------------------------------
PDF file name(s) which should be opened, closed or printed. Please note, if filename
contains spaces, it should be enclosed into quotes ("")
Best,
Stefan
R.Janssen
User
Posts: 36
Joined: Thu Jun 17, 2010 3:30 pm

Re: Open PDF viewer on a defined directory

Post by R.Janssen »

Yes, I have seen that you can open files that way.
But what I want to do is start the viewer with no files open, and then when the user clicks open or
doubleclicks on the background, the open dialog appears showing the files.
There are too many files to open them all at once.

I'll see if I can locate that windows registry key that manages the open location...
Edit: I found it is in:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedMRU

The structure is complex to handle... well.
The previous application we used (for another format than PDF) accepts a directory name as a
commandline argument and shows the open dialog starting from that directory. When given a
filename it just opens the file, like the PDF viewer.
They probably coded a special case for when the passed parameter is a directory instead of a file.
PDF xchange viewer does nothing special in that case (no errormessage either)...
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7444
Joined: Wed Mar 25, 2009 10:37 pm

Re: Open PDF viewer on a defined directory

Post by Paul - PDF-XChange »

Hi R.Janssen,

I see your point, I can see the usefulness of this. I've asked one of the dev team to consider this and let me know if this is a practical/reasonable feature request. V3 initial release features are now cast in stone so if this were to be something we could add it would nee to be in some later version.

hth
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
R.Janssen
User
Posts: 36
Joined: Thu Jun 17, 2010 3:30 pm

Re: Open PDF viewer on a defined directory

Post by R.Janssen »

Thanks. For now I have educated the users to use an Explorer window
and open the files from there. It works, but they liked the previous
version better :-)
(this was with the Argus Cold Retrieve application that was previously used
to access those documents)
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7444
Joined: Wed Mar 25, 2009 10:37 pm

Re: Open PDF viewer on a defined directory

Post by Paul - PDF-XChange »

Hi R.Janssen,

it's formally on the V3+ wish list. As usual with the caveat that this is not a promise to deliver the feature but a committment to investigate the practicality of adding it. It is at the discretion of the dev team .

hth
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com