PDF-XChange - Tracker PDF Viewer - TIFF-XChange - Image-XChange - XMF-XChange - Raster-XChange - Support

Moderators: Tracker Support, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Tracker Supp-Stefan

 
helgek
User
Topic Author
Posts: 12
Joined: Thu Sep 14, 2017 4:45 pm

run custom sequence from all clients without requiring tool import first

Thu Sep 14, 2017 4:55 pm

Hi,

in a many users environment I'd like to easily distribute action sequences to many users in the way that the users don't have to import the sequence first and create a shortcut to it.

An approach for me would be to export the tool (I would only select the tool I need) and then set up a commandline command that I can distribute to the users via a Network drive (through vbscript).

Is something like
"C:\Program Files\Tracker Software\PDF Tools V6\PDFXTools.exe" -pdtex:customsequence
already possible?

Thanks,
Helge
 
User avatar
Patrick-Tracker Supp
Site Admin
Posts: 1470
Joined: Thu Mar 27, 2014 6:14 pm
Location: Vancouver Island
Contact:

Re: run custom sequence from all clients without requiring tool import first

Thu Sep 14, 2017 5:14 pm

Hello Helgek,

Thank you for your post and welcome to our forums. You will find some relevant command line options for Tools documented here: http://help.tracker-software.com/pdfxt6 ... ons_t.html

You can use the /DumpTools command to identify your custom tools, then use the /ExportTools command as documented. Finally, you can use the /ImportSettings command to import your tools.

PDFXTools.exe /ImportSettings "c:\PDF-Tools_Exchange.pdtex"


I hope this helps!
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Cheers,

Patrick Charest
Tracker Support North America
 
helgek
User
Topic Author
Posts: 12
Joined: Thu Sep 14, 2017 4:45 pm

Re: run custom sequence from all clients without requiring tool import first

Thu Sep 14, 2017 5:24 pm

Hi Patrick,

thank you for your prompt response.

I tried the ImportSettings on my build 322.5 but it doesn't work (simplified commandline setup using a pdtex file directly under c:\ without spaces in the file Name, I drag and dropped the file into the cmd window to make sure the filename is correct). Instead it opens PDF-Tools. The DumpTools command works.

Would the UID of the tool be the same on all clients to which the settings are imported? If I run the import each time beforehand I execute a tool via script would it automatically overwrite the existing tool?

Thanks,
Helge
Last edited by helgek on Thu Sep 14, 2017 5:33 pm, edited 1 time in total.
 
helgek
User
Topic Author
Posts: 12
Joined: Thu Sep 14, 2017 4:45 pm

Re: run custom sequence from all clients without requiring tool import first

Thu Sep 14, 2017 5:29 pm

Additional note: I also tried /ImportTools because the documentation talks also mentions an /ExportTools command.
 
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 1824
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: run custom sequence from all clients without requiring tool import first

Thu Sep 14, 2017 7:20 pm

Hi Helge.

I tried the ImportSettings on my build 322.5 but it doesn't work (simplified commandline setup using a pdtex file directly under c:\ without spaces in the file

We found one issue with /ImportSettings so it is unusable temporarily but will be fixed in the near future. Instead this, to import tools(or other previously exported settings), use simple:

PDFXTools.exe "c:\PDF-Tools_Exchange.pdtex"

- in that case be sure that file has correct .pdtex extension.

Would the UID of the tool be the same on all clients to which the settings are imported? If I run the import each time beforehand I execute a tool via script would it automatically overwrite the existing tool?

Yes, it keeps the UIDs of custom tools as well.

HTH.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
 
helgek
User
Topic Author
Posts: 12
Joined: Thu Sep 14, 2017 4:45 pm

Re: run custom sequence from all clients without requiring tool import first

Thu Sep 14, 2017 8:32 pm

Hi Vasyl,

thank you, the command works but it asks for a confirmation which settings shall be imported. Can I somehow avoid this dialog?

The uid remained the same indeed when I deleted the tool and reimported it. I didn't test on a second device yet but this already looks promising.

Thanks,
Helge
 
helgek
User
Topic Author
Posts: 12
Joined: Thu Sep 14, 2017 4:45 pm

Re: run custom sequence from all clients without requiring tool import first

Thu Sep 14, 2017 8:53 pm

Update: Tested Import on second device. UID remains the same. Great! So the dialog is the only thing keeping me from full automatization.
 
DenisO
User
Posts: 4
Joined: Fri Jun 09, 2017 5:40 pm

Re: run custom sequence from all clients without requiring tool import first

Fri Sep 15, 2017 2:45 pm

helgek wrote:
the dialog is the only thing keeping me from full automatization.

Hi helgek,

I have workaround for this issue. You can use vbs file to automatically close the dialog by "pressing" Enter. Create text file with extension .vbs. Put the following text in it.
Set objArg = WScript.Arguments
if objArg.count = 0 then WScript.Quit
Set WshShell = CreateObject("WScript.Shell")
command = "C:\Program Files\Tracker Software\PDF Tools V6\PDFXTools.exe " & objArg(0)
' "C:\Program Files\Tracker Software\PDF Tools V6\PDFXTools.exe " is the path to installed PDF Tools. `Replace it if your path differs.
Set WshExec = WshShell.Exec(command)
WScript.Sleep 1000
WshShell.AppActivate WshExec.ProcessID
WshShell.SendKeys("{TAB}")
WshShell.SendKeys("{ENTER}")


run file.vbs <importtoolsFile> in command line and hopefully the issue will be solved. The scrpit works only with single command line argument
Also you can find my version of the script in attachment.
ImportTools.zip
(444 Bytes) Downloaded 8 times
. Just change file extension from .txt to .vbs

Kind Regards.
 
DenisO
User
Posts: 4
Joined: Fri Jun 09, 2017 5:40 pm

Re: run custom sequence from all clients without requiring tool import first

Fri Sep 15, 2017 3:09 pm

I have another version of the script
Set objArg = WScript.Arguments
if not objArg.count = 2 then WScript.Quit
Set WshShell = CreateObject("WScript.Shell")
command = objArg(0) & " " & objArg(1)
Set WshExec = WshShell.Exec(command)
WScript.Sleep 1000
WshShell.AppActivate WshExec.ProcessID
WshShell.SendKeys("{TAB}")
WshShell.SendKeys("{ENTER}")


It takes two arguments: the path to PDFXTools.exe and the path to imported file. Just run script.vbs path1 path2.
In attachment you can find my version. Change the extension from .txt to .vbs
Attachments
test1.zip
(343 Bytes) Downloaded 9 times
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 11551
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: run custom sequence from all clients without requiring tool import first

Fri Sep 15, 2017 4:19 pm

Many thanks for the suggestions DenisO!!!

helgek - please let us know if those helped!

Cheers,
Stefan
 
helgek
User
Topic Author
Posts: 12
Joined: Thu Sep 14, 2017 4:45 pm

Re: run custom sequence from all clients without requiring tool import first

Mon Sep 18, 2017 3:18 pm

Hi DenisO,

thank you so much for your kind help!

You're script works perfectly! I was able to fully automatize the word to pdf workflow + adding a digital signature to all converted documents.

One should add WScript.Quit add the end of the final script to release the PDF Tools process which locks the .pdtex workflow file.

Thanks again,
Helge

DenisO wrote:
helgek wrote:
the dialog is the only thing keeping me from full automatization.

Hi helgek,

I have workaround for this issue. You can use vbs file to automatically close the dialog by "pressing" Enter. Create text file with extension .vbs. Put the following text in it.
Set objArg = WScript.Arguments
if objArg.count = 0 then WScript.Quit
Set WshShell = CreateObject("WScript.Shell")
command = "C:\Program Files\Tracker Software\PDF Tools V6\PDFXTools.exe " & objArg(0)
' "C:\Program Files\Tracker Software\PDF Tools V6\PDFXTools.exe " is the path to installed PDF Tools. `Replace it if your path differs.
Set WshExec = WshShell.Exec(command)
WScript.Sleep 1000
WshShell.AppActivate WshExec.ProcessID
WshShell.SendKeys("{TAB}")
WshShell.SendKeys("{ENTER}")


run file.vbs <importtoolsFile> in command line and hopefully the issue will be solved. The scrpit works only with single command line argument
Also you can find my version of the script in attachment.ImportTools.zip . Just change file extension from .txt to .vbs

Kind Regards.
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 11551
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: run custom sequence from all clients without requiring tool import first

Mon Sep 18, 2017 4:20 pm

Hello Helge,

Glad to hear this solved the problem!

And many thanks for the idea DenisO!

Cheers,
Stefan
 
helgek
User
Topic Author
Posts: 12
Joined: Thu Sep 14, 2017 4:45 pm

Re: run custom sequence from all clients without requiring tool import first

Sun Sep 24, 2017 9:35 pm

A short follow-up:

The solution doesn't work reliably on all clients I tested and some online research about AppActivate and SendKeys confirms by other user's experiences that this solution can behave differently on different systems, influenced by multiple parameters (e.g. other applications interfering because of their windows behaviour). Because of that I'd strongly suggest to definitely resolve the import issue as soon as possible. I'd be very grateful if you could post an update here once there's an official release without this problem.

Thanks,
Helge
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 11551
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: run custom sequence from all clients without requiring tool import first

Mon Sep 25, 2017 11:25 am

Hello Helge,

Thanks for the follow up and update.
Sorry to hear that the workaround offered is not universal :(, and as for the update with the fix - it is planned for around the middle of October if all goes smoothly!

You can check the version history here:
https://www.tracker-software.com/produc ... ls/history
And as soon as a new build number appears - the build would be our as well!

Regards,
Stefan
 
DenisO
User
Posts: 4
Joined: Fri Jun 09, 2017 5:40 pm

Re: run custom sequence from all clients without requiring tool import first

Tue Sep 26, 2017 3:56 pm

helgek wrote:
A short follow-up:
The solution doesn't work reliably on all clients

Hi Helge,
could you please describe the issues you entcountered? May be I can help with them.
Best Regards
 
helgek
User
Topic Author
Posts: 12
Joined: Thu Sep 14, 2017 4:45 pm

Re: run custom sequence from all clients without requiring tool import first

Sun Oct 01, 2017 12:29 am

Hi Denis,

again thank you for your kind offer. The problem with replication of the issue is that I couldn't replicate it on my own system. Additionaly on other systems running the PDF workflow vbscript the first time I saw an error message from PDF Tools that it couldn't find the custom workflow. Interestingly also this error could not be replicated a second time once the script was executed once on a client system (e.g. by deleting the custom workflow in PDF Tools and running the script again).

I have adjusted the vbscript a bit adding a repetition of the appactivate command and also adding an appactivate = true check. Unfortunately I didn't yet have the opportunity to test on more "virgin" systems with these adjustments and it will probably take another one or two weeks before I will have the opportunity/time. As there seems to be a chance that the new PDF Tools release is due soon I think one should not invest too much energy into this regarding sendkeys (and fortunately I'm also not under specific time pressure to have it working completely smoothly).

@TrackerSoftware: I'd suggest that for the upcoming release you should also test a script doing a first import of custom workflow + execution of this custom workflows on a system with PDF Tools installed for the first time.

Thanks,
Helge

DenisO wrote:
helgek wrote:
A short follow-up:
The solution doesn't work reliably on all clients

Hi Helge,
could you please describe the issues you entcountered? May be I can help with them.
Best Regards
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 11551
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: run custom sequence from all clients without requiring tool import first

Mon Oct 02, 2017 12:16 pm

Hello Helge,

Thanks for the feedback.
Yes - the new build is approaching fast - with the release planned for a bit later this month, but I will pass your observations to Vasyl so that he can run some tests similar to yours when fixing this!

Cheers,
Stefan
 
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 1824
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: run custom sequence from all clients without requiring tool import first

Mon Oct 02, 2017 5:03 pm

Hi, Helge.

For sure, we already fixed that issue and tested it well for the new upcoming build - the /ImportSetting will run for you without any UI by default.
Please wait new build.

And sorry again for such inconveniences.. :(

Best
Regards.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
 
helgek
User
Topic Author
Posts: 12
Joined: Thu Sep 14, 2017 4:45 pm

Re: run custom sequence from all clients without requiring tool import first

Mon Oct 09, 2017 12:52 pm

Thank you Vasyl. I'm looking forward to integrate the new version once it is available. I'm glad you're working on these automatization features. In a corporate environment they offer really interesting use cases.

Vasyl-Tracker Dev Team wrote:
Hi, Helge.

For sure, we already fixed that issue and tested it well for the new upcoming build - the /ImportSetting will run for you without any UI by default.
Please wait new build.

And sorry again for such inconveniences.. :(

Best
Regards.
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 11551
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: run custom sequence from all clients without requiring tool import first

Mon Oct 09, 2017 1:02 pm

Glad we could assist helgek!

Cheers,
Stefan
 
helgek
User
Topic Author
Posts: 12
Joined: Thu Sep 14, 2017 4:45 pm

Re: run custom sequence from all clients without requiring tool import first

Mon Oct 09, 2017 3:23 pm

Hi Stefan, all,

I forgot to mention one more suggestion regarding the command line parameters. It would be really nice if one could pass a start path for the file dialog showing up when you have a "select files" dialog in your workflow (I don't use the English version so I don't know what the concrete name for the file selection dialog workflow item is in the English version).

Thanks,
Helge
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 11551
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: run custom sequence from all clients without requiring tool import first

Mon Oct 09, 2017 3:45 pm

Hi Helge,

I believe this is handled by windows - so not something we control.
But through the command line you can skip the file selection dialogue all together if you pass the full list of files and have set the tool to not display that same dialogue!

Regards,
Stefan
 
helgek
User
Topic Author
Posts: 12
Joined: Thu Sep 14, 2017 4:45 pm

Re: run custom sequence from all clients without requiring tool import first

Tue Oct 10, 2017 9:14 am

Hi Stefan,

the api of Windows - at least with VB and VBA - allows you to set a start path. I'm pretty sure this is also possible with the dialog control PDF Tools uses. But you're right, I can possibly also set up my own dialog control to pass the file filenames to PDF Tools. I will have a look at it.

Thanks,
Helge

Tracker Supp-Stefan wrote:
Hi Helge,

I believe this is handled by windows - so not something we control.
But through the command line you can skip the file selection dialogue all together if you pass the full list of files and have set the tool to not display that same dialogue!

Regards,
Stefan
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 11551
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: run custom sequence from all clients without requiring tool import first

Tue Oct 10, 2017 10:50 am

Hi Helge,

I will pass your suggestion to my colleagues - but in the mean time please try to work with passing the file paths directly!

Cheers,
Stefan
 
helgek
User
Topic Author
Posts: 12
Joined: Thu Sep 14, 2017 4:45 pm

Re: run custom sequence from all clients without requiring tool import first

Tue Oct 10, 2017 11:49 am

Hi Stefan,

I just modified my script using my own dialog and the file paths passed to PDF Tools are being processed correctly.

You should know that my solution of running my own file dialog works only because in the corporate environment I'm using the PDF workflow in every client has MS Office installed by default. I'm using MS Word API to show a file dialog. Using standard tools of windows via VBScript would not make it possible to have a native dialog with individual start folder and multi-selection of files. So my solution is not a solution for all PDF Tools workflow scenarios. Because of these constraints I'd still recommend you to consider the feature like I sketched it.

Best,
Helge

Tracker Supp-Stefan wrote:
Hi Helge,

I will pass your suggestion to my colleagues - but in the mean time please try to work with passing the file paths directly!

Cheers,
Stefan
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 11551
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: run custom sequence from all clients without requiring tool import first

Tue Oct 10, 2017 2:24 pm

Thanks for sharing this Helge,

Indeed - what you have utilized is not something everyone could have so it indeed a custom solution for your environment and needs.
I've already passed the above suggestion for consideration, but my colleagues that can look at this are in another office and have not yet started for the day.

Regards,
Stefan

p.s. I've just discussed your use case with the project leader for Tools - and unfortunately this seems like quite a niche feature to be implemented in general. We believe that the command line should be used with as little user interaction as possible - and the file paths passed directly without letting the user chose them there.

Who is online

Users browsing this forum: No registered users and 1 guest