Print all open files

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
petwes
User
Posts: 2
Joined: Wed Nov 19, 2014 1:15 pm

Print all open files

Post by petwes »

Is it possible to print all open files at once?
So without selecting the tab's?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17823
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Print all open files

Post by Tracker Supp-Stefan »

Hello petwes,

Welcome to our forums.
There is a "Print All" button in the list of commands in the Editor - but this is still inactive. It will be enabled in a future build.
In the mean time you can use the attached script file.
Extract the archives contents in
C:\Users\<<YOUR WINDOWS USERNAME>>\AppData\Roaming\Tracker Software\PDFXEditor\3.0\JavaScripts
(if the JavaScripts folder does not exist - create it)
And then restart the Editor.

This should result in a new button appearing in a separate toolbar in the Editor. When you click that - it will print all of your files, but show you the print preview window for each, so you will need to click the OK button for each file you want to print. If you want to "print all" silently - open the .js file in e.g. notepad and uncomment the indicated line.

Regards,
Stefan
Attachments
printAllOpenedDocs.zip
(456 Bytes) Downloaded 425 times
petwes
User
Posts: 2
Joined: Wed Nov 19, 2014 1:15 pm

Re: Print all open files

Post by petwes »

Thank you very much for your support.
I have done it, and it works very fine.

This is the solution i was looking for.... :D :D
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17823
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Print all open files

Post by Tracker Supp-Stefan »

:)
blutackey
User
Posts: 4
Joined: Thu Jul 27, 2017 12:15 am

Re: Print all open files

Post by blutackey »

Hi,

I'd also like to say thanks for the script, it works great! Saves quite a bit of time. Would be even better if you could just hit the print button once without having to worry about the Print dialog box appearing for every document. Do you know if this feature will still be implemented? It seems like this post was from a long time ago and the icon is still greyed out.

One more thing, can I change the java script icon from a puzzle to a printer icon to make it easier for people to know what the icon does?

Thanks again!
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: Print all open files

Post by Will - Tracker Supp »

Hi blutackey,

Thanks for the post - Icons can be supplied for JavaScript buttons, but it's not as easy as it would seem. I would recommend that you simply add the cName & cLabel lines to the JavScript, e.g.
Image

If you did want to add an icon, you would need to create the icon file yourself. It can then be supplied to the script as per the oIcon property of the app.addToolButton method described here:
http://help.adobe.com/en_US/acrobat/acr ... _1_8_6_1_2

HTH!
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.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
blutackey
User
Posts: 4
Joined: Thu Jul 27, 2017 12:15 am

Re: Print all open files

Post by blutackey »

Thanks for the help, you guys are really great!
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: Print all open files

Post by Will - Tracker Supp »

No problem at all! :D
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.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
User avatar
AndyK
User
Posts: 102
Joined: Sun Jul 27, 2008 8:52 pm

Re: Print all open files

Post by AndyK »

@Tracker Supp-Stefan

this way don't work anymore :-(
https://www.pdf-xchange.com/forum3 ... 821#p88112

ist there a new JS file for that?

Thank you
Andy
User avatar
Ovg
User
Posts: 461
Joined: Tue Sep 05, 2017 4:56 pm

Re: Print all open files

Post by Ovg »

Hmm ... I have tested just now - working fine for me .....
It's impossible to lead us astray for we don't care even to choose the way.
PDF-XChange PRO, 10.1.1 (Build 381) / W7 SP1 x64
User avatar
AndyK
User
Posts: 102
Joined: Sun Jul 27, 2008 8:52 pm

Re: Print all open files

Post by AndyK »

mhh, now it's working for me too … strange Image

Andy
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6831
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Print all open files

Post by Paul - Tracker Supp »

:?
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Peter2
User
Posts: 946
Joined: Mon Sep 13, 2010 10:09 am
Location: Switzerland

Re: Print all open files

Post by Peter2 »

blutackey wrote: Mon Jul 31, 2017 12:54 am...Do you know if this feature will still be implemented? It seems like this post was from a long time ago and the icon is still greyed out....
The original question is more then 4 years old, the quoted text more then 1.5 years. Something new with this? Seem to be still inactive ....
PDF-X-Change Pro German
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: Print all open files

Post by TrackerSupp-Daniel »

Hello Peter2,

While we have not made much progress on this front yet, it is still something that we are looking at the possibility of in the future. Thus while I cannot give any sort of a timeline, we have certainly not ruled out implementing it.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
misterbobthetomato
User
Posts: 11
Joined: Sun Sep 08, 2019 2:00 pm

Re: Print all open files

Post by misterbobthetomato »

I believe there was a script for a PrintAll alternative here somewhere. May I have the link AND is it still up-to-date?

Thank you!
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: Print all open files

Post by Will - Tracker Supp »

Hi misterbobthetomato,

Thanks for the post - Stefan's original reply (second post in this thread) is still the correct script. Scripts should always continue working between versions, as we keep our JavaScript API compatible with the Adobe JavaScript API and any changes would go against the industry standard and break compatibility.

Thanks,
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.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
misterbobthetomato
User
Posts: 11
Joined: Sun Sep 08, 2019 2:00 pm

Re: Print all open files

Post by misterbobthetomato »

Fantastic! I'll try it soon.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: Print all open files

Post by Will - Tracker Supp »

:D
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.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
User avatar
AndyK
User
Posts: 102
Joined: Sun Jul 27, 2008 8:52 pm

Re: Print all open documents

Post by AndyK »

Hi,

is it possible to give this command (puzzle icon) an other icon?

PrintAllPDF.png

e.g. from the not working icon "Print all..."?
Or can we give this command "Print all..." the JavaScript for working?

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

Re: Print all open files

Post by Tracker Supp-Stefan »

Hello AndyK,

I am using the attached icon and "printAll.js" file:
PrintAll.zip
(1.51 KiB) Downloaded 58 times
You need to extract and place those files in:
%Appdata%\Tracker Software\PDFXEditor\3.0\JavaScripts

Please note that the path to the icon inside the JS file is specific to my machine, so you will need to open the .js file and update it accordingly to your JS files folder (it can not use %APPDATA% ... so it has to be typed in explicitly).

Kind regards,
Stefan
User avatar
Ovg
User
Posts: 461
Joined: Tue Sep 05, 2017 4:56 pm

Re: Print all open files

Post by Ovg »

customizing add-on toolbar:

https://forum.pdf-xchange.com/viewtopic.php?f=62&t=28855&p=127141
It's impossible to lead us astray for we don't care even to choose the way.
PDF-XChange PRO, 10.1.1 (Build 381) / W7 SP1 x64
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17823
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Print all open files

Post by Tracker Supp-Stefan »

Hello Ovg,

Thanks for this! I knew there were some older topics - but I thought giving the icon and js ready made would be easier!

Kind regards,
Stefan
User avatar
Ovg
User
Posts: 461
Joined: Tue Sep 05, 2017 4:56 pm

Re: Print all open files

Post by Ovg »

Hello Stefan!

Those post is describing general principles of adding and customizing buttons to toolbar, so IMHO it might be interesting
It's impossible to lead us astray for we don't care even to choose the way.
PDF-XChange PRO, 10.1.1 (Build 381) / W7 SP1 x64
User avatar
AndyK
User
Posts: 102
Joined: Sun Jul 27, 2008 8:52 pm

Re: Print all open files

Post by AndyK »

Tracker Supp-Stefan wrote: Tue Feb 09, 2021 11:43 am I am using the attached icon and "printAll.js" file:
PrintAll.zip
https://forum.pdf-xchange.com/download/file.php?id=14861
The selected attachment does not exist anymore. :(
Last edited by AndyK on Tue Feb 09, 2021 2:39 pm, edited 1 time in total.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17823
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Print all open files

Post by Tracker Supp-Stefan »

Hello AndyK,

We moved the server on which our forum is located very shortly after my above post - so maybe that's why the attachment got lost.
Here it is once again.
PrintAll.zip
(1.51 KiB) Downloaded 62 times
Kind regards,
Stefan
User avatar
AndyK
User
Posts: 102
Joined: Sun Jul 27, 2008 8:52 pm

Re: Print all open files

Post by AndyK »

Hi Stefan

I think I use the JavaScript from this post:

https://forum.pdf-xchange.com/viewtopic.php?p=111945#p111945

The icon is direct in the code :-)

Print.All.Opened.Docs.zip
(1.24 KiB) Downloaded 95 times

Thanks for your help
Andy
Last edited by AndyK on Tue Feb 09, 2021 3:23 pm, edited 2 times in total.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17823
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Print all open files

Post by Tracker Supp-Stefan »

Hello AndyK,

That will also work - but it's 'less pretty' :D

Kind regards,
Stefan
Peter2
User
Posts: 946
Joined: Mon Sep 13, 2010 10:09 am
Location: Switzerland

Re: Print all open files

Post by Peter2 »

I still (try to) use the original code to print "silent" - without dialogue

Code: Select all

function Alles_drucken_sofort(){
  var ad = app.activeDocs;
  for (var i = 0; i < ad.length; i++)
  {
    var pp = ad[i].getPrintParams();
    // uncomment the next line to print without dialog for each document
    pp.interactive = pp.constants.interactionLevel.silent;
    ad[i].print(pp);
  }
}
my problem: It still shows the print-dialogue for every file. 2 years ago it worked fine. Has something changed ??
PDF-X-Change Pro German
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: Print all open files

Post by TrackerSupp-Daniel »

Hello, Peter2

I am passing this along to the Dev team to look into why the Js may not be working. For the time being, did you know that we have added a "print all" feature to the Editor natively now? You can find this by searching in the quick launch area (you can even drag it into the toolbar to a needed location straight from the search area)
This new feature combines all opened files into a single document and prints them in one action, so while you would see a print dialog, it would only be one, instead of one per file.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Puffolino
User
Posts: 317
Joined: Wed Feb 09, 2011 1:06 pm

Re: Print all open files

Post by Puffolino »

Hi, I am using the activeDocs function as well to clean the document information of all opened files.

Any chance that this will work again when such functions are assigned to buttons?

Code: Select all

function CleanInformation()
{
	var ad = app.activeDocs;
	var fc = ad.length;
	var txt = "";

	app.alert({ cMsg: "FC: "+fc+"\n", cTitle: "Debugging Information", 	nIcon: 1, nType: 0 });

	if (fc)
	{
		for (var i = 0; i < fc; i++)
		{
			var file=ad[i].documentFileName;
			if (fille.substring(...
			{
				txt=txt+"'"+file+"' updated\n";
			}
		}
		if (txt=="")
		{
			txt="No changes have been done.";
		}
		app.alert({ cMsg: txt, cTitle: "Information Cleaner", nIcon: 3, nType: 0 	});
	}
	else
	{
		app.alert({ cMsg: "No pdf document has been loaded... @%$!", cTitle: "Information Cleaner", nIcon: 3, nType: 0	});
	}
}
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17823
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Print all open files

Post by Tracker Supp-Stefan »

Hello Puffolino,

It is not likely that functions that require privileged context will in the future work without the correct one.

Have you tried with Trusted functions like the one described here:
viewtopic.php?p=170725#p170725

Kind regards,
Stefan
Post Reply