You are on page 1of 4

PSA Tools RMM Tools

How To Guides MSP News    Search...

JOIN MY NEWSLETTER

How to print PDF files and automatically Your Name

Your Name
include a filename
posted on JULY 13, 2018 by OLIVER MARSHALL Your Email address:

Your email address

Schedule
Daily updates
Weekly updates

Sign up

RELATED ARTICLES

How to print PDF les and


automatically include a lename
JULY 13, 2018

Windows Server 2012 R2 stuck in

I was asked how to print PDF les and automatically include a lename on the print out. reboot cycle due to failed

This was for a team of users whose technical diagrams were meant to include the updates
AUGUST 2, 2017
lename of the le but, inevitably, this was missed out. In many applications you can
automate this process, include variables in the footer or header, but in this case the
How to nd the SSL certi cate
users used a variety of tools and really the only common factor was that they delivered
used by LDAPS
the nal versions in PDF format. JUNE 9, 2017

The solution had to be pretty straightforward, ideally with someone being able to right How to x cannot connect to
click the le and print it with a lename stamped on the print out. proxy error in Storagecraft CMD
endpoint
The solution is a bit long-winded but it works well and, once done, should just keep on APRIL 27, 2017

ticking. I’m assuming that all the machines are Windows 10 64bit.
Dell XPS 9560 stuck at Dell logo
1. Install Irfanview 64-bit from here and install it. Irfanview is a superb opensource after bios update 1.2.4
image viewer with great batch le and command line features. APRIL 25, 2017

2. Install the Irfanview 64-bit plugin pack from here. This will add support for viewing
PDFs (as well as loads of other le types).

3. Open Irfanview 64-bit and from there open a PDF le. You may have to change the NEWS
lename to *.PDF in order to show PDF les.
4. Now print the le by clicking File > Print from the menu bar. We’ll be setting the
The never-present Microsoft To-
Footer information to include the lename variable ($F). Be sure to click the SAVE
Do
button (highlighted).

How to unencrypt your drive


after a Petya malware infection

Smoothwalls new safeguarding


reports are going to be
awesome

5 reasons for schools to look


forward to iOS 9.3

4 awesome WiFi mapping tools

LATEST HOW TOS


5. Cancel that box and close Irfanview.

6. Now that the printing aspect is con gured we need to add a right click menu. I How to print PDF les and
created a custom context menu entry to send the le to Irfanview and order it to automatically include a lename
print using the default printer. Download the REG le here. Expand the zip le and JULY 13, 2018 0

double click the reg le you nd there. This will add it to your registry. You may need
I was asked how to print PDF les and
to reboot afterwards but it should just work. automatically include a lename on the print

7. You should now see a new right click menu when right clicking PDF les. out. This was for a team of users whose
technical diagrams were meant to…

Why does O ce 365 show Guest


Contributor as having modi ed a
le?
FEBRUARY 1, 2018 0

How to change the default


sharing permissions in OneDrive
FEBRUARY 1, 2018 0

How to create a Track in


How does it work? Connectwise
NOVEMBER 24, 2017 0
Irfanview view takes care of adding the lename as a footer to the print out. We’re
focusing on a PDF here but it could be any le type that Irfanview supports. As long as Windows Server 2012 R2 stuck in
you save the printer settings in the printer dialogue then that footer will be included in reboot cycle due to failed
anything that’s printed out. updates
AUGUST 2, 2017 0

The context menu is handled by a registry entry that’s kept in the .reg le. Double-
clicking the .reg le imports it. The .reg le itself looks like this;

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\SystemFileAssociations\.pdf]

[HKEY_CLASSES_ROOT\SystemFileAssociations\.pdf\Shell]
[HKEY_CLASSES_ROOT\SystemFileAssociations\.pdf\Shell\PrintwithFile]

@="Print with Filename"

[HKEY_CLASSES_ROOT\SystemFileAssociations\.pdf\Shell\PrintwithFile\command]

@="\"C:\\Program Files\\IrfanView\\i_view64.exe\" \"%1\" /print"

You can see that it assumes the location of Irfanview is “C:\Program


Files\IrfanView\i_view64.exe” which is ne for any x64 version of Windows. If you wanted
to change this to work with JPG les then you could just edit the .reg le in Notepad and
replace .PDF with .JPG, save, and re-import the le.

Tags: Windows

« Why does O ce 365 show Guest


Contributor as having modi ed a le?

Related Posts
Windows Server 2012 R2 stuck in reboot cycle due to failed updates
AUGUST 2, 2017

How to nd the SSL certi cate used by LDAPS


JUNE 9, 2017

How to x cannot connect to proxy error in Storagecraft CMD endpoint


APRIL 27, 2017

Dell XPS 9560 stuck at Dell logo after bios update 1.2.4
APRIL 25, 2017

What’s running on port 8000 ?


APRIL 12, 2017

Author
Oliver Marshall

View all posts by Oliver Marshall →

Oliver works as the Head of Sales at Class Technology, a leading provider of IT services to
the education sector. Out of hours he's a runner with a limp, has a board game addiction
and a owns a dog that looks like a badger.
0 Comments olivermarshall.net 
1 Login

 Recommend 1 t Tweet f Share Sort by Best

Start the discussion…

LOG IN WITH
OR SIGN UP WITH DISQUS ?

Name

Be the first to comment.

ALSO ON OLIVERMARSHALL.NET

How to install OpenVAS 9 on Ubuntu What’s running on port 8000 ?


16 LTS 2 comments • 2 years ago
3 comments • 2 years ago David R — Thanks for this.... could not
arunbabu r — I am getting error for this figure out if something was blocking port
command sudo openvasmd --rebuild -- 8000 being used for something else, or if
progress

How to flush the DNS cache in Customizing Snipe – Changing email


ChromeOS templates
2 comments • 4 years ago 5 comments • 4 years ago
BoB — Thanks Oliver. I'm somewhat new snipe — FYI, the product is Snipe-IT. *I*
to Chromebooks and have been having am Snipe. :)
challenges with a new router. After about

✉ Subscribe d Add Disqus to your siteAdd DisqusAdd


🔒 Disqus' Privacy PolicyPrivacy PolicyPrivacy

MY SOCIAL NETWORKS LATEST TWEETS META

Google+ Anyone know what the cause of the Log in


delay is on the French side of the
#eurotunnel? Not even being allowed Entries RSS
Facebook
to check in. @LeShuttle? 7 days ago
Comments RSS

Twitter @SundayBrunchC4 will the chorizo


WordPress.org
recipe from today be up online soon?
#starving 3 weeks ago

@cairngorm_mrt my wife would like to


know where "Young Iain" got his
glasses from. She reckons they'd suit
me. Can you ask? 2 months ago

Follow me on Twitter

Copyright © 2013 Compasso Theme. All rights reserved. Powered by WordPress

You might also like