How Do You Print A Pdf File On Windows 7

Posted on  by 



How Do You Print A Pdf File On Windows 7How Do You Print A Pdf File On Windows 7

I was asked how to print PDF files and automatically include a filename on the print out. This was for a team of users whose technical diagrams were meant to include the filename of the file 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 users used a variety of tools and really the only common factor was that they delivered the final versions in PDF format.

How Do You Print A Pdf File On Windows 7Windows

If you open a web page or document from Chrome, you can print to pdf from the File–Print menu. Microsoft office can print to pdf. On the print preview window select export to XPS/PDF. Other applications like Firefox don’t have their own print to pdf feature. Simply select Print. Choose PDF in your printer options to turn your file into a high-quality Adobe PDF document. After you create PDF files, you can edit and share them. You can also print PDF files if you ever need hard copies.

The solution had to be pretty straightforward, ideally with someone being able to right click the file and print it with a filename stamped on the print out.

The solution is a bit long-winded but it works well and, once done, should just keep on ticking. I’m assuming that all the machines are Windows 10 64bit.

  1. Install Irfanview 64-bit from here and install it. Irfanview is a superb opensource image viewer with great batch file and command line features.
  2. Install the Irfanview 64-bit plugin pack from here. This will add support for viewing PDFs (as well as loads of other file types).
  3. Open Irfanview 64-bit and from there open a PDF file. You may have to change the filename to *.PDF in order to show PDF files.
  4. Now print the file by clicking File > Print from the menu bar. We’ll be setting the Footer information to include the filename variable ($F). Be sure to click the SAVE button (highlighted).
  5. Cancel that box and close Irfanview.
  6. Now that the printing aspect is configured we need to add a right click menu. I created a custom context menu entry to send the file to Irfanview and order it to print using the default printer. Download the REG file here. Expand the zip file and double click the reg file you find there. This will add it to your registry. You may need to reboot afterwards but it should just work.
  7. You should now see a new right click menu when right clicking PDF files.

How Do You Print A Pdf File On Windows 7 64-bit

Windows

How does it work?

Irfanview view takes care of adding the filename as a footer to the print out. We’re focusing on a PDF here but it could be any file type that Irfanview supports. As long as you save the printer settings in the printer dialogue then that footer will be included in anything that’s printed out.

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

2
4
6
[HKEY_CLASSES_ROOTSystemFileAssociations.pdf]
[HKEY_CLASSES_ROOTSystemFileAssociations.pdfShell]
[HKEY_CLASSES_ROOTSystemFileAssociations.pdfShellPrintwithFile]
[HKEY_CLASSES_ROOTSystemFileAssociations.pdfShellPrintwithFilecommand]
@='C:Program FilesIrfanViewi_view64.exe' '%1' /print'

How To Print A Pdf File On Windows 7

You can see that it assumes the location of Irfanview is “C:Program FilesIrfanViewi_view64.exe” which is fine for any x64 version of Windows. If you wanted to change this to work with JPG files then you could just edit the .reg file in Notepad and replace .PDF with .JPG, save, and re-import the file.





Coments are closed