Program for printing a list of PDF files

Click For Summary
SUMMARY

This discussion focuses on creating a script to automate the printing of PDF files based on a list of drawing numbers from an Excel file. The user needs to modify the drawing numbers by removing the trailing slash and two digits, then appending ".pdf" to generate the correct file names. The solution involves using Adobe Reader's command line switch "/t" for printing, specifically with the executable path "C:\\Program Files (x86)\\Adobe\\Reader 10.0\\Reader\\AcroRd32.exe". The script should be compatible with Windows 8 and allow for easy text input and printing.

PREREQUISITES
  • Basic understanding of scripting languages (e.g., Python, PowerShell)
  • Familiarity with command line operations in Windows
  • Knowledge of file path syntax in Windows
  • Experience with Adobe Reader and its command line options
NEXT STEPS
  • Research how to write a script in Python for file manipulation and printing
  • Learn about PowerShell scripting for automating tasks in Windows
  • Explore the use of regular expressions for string manipulation
  • Investigate the Adobe Reader command line options for advanced printing features
USEFUL FOR

This discussion is beneficial for developers, system administrators, and anyone looking to automate PDF printing tasks in a Windows environment.

jegues
Messages
1,085
Reaction score
3
I am trying to figure out if it would be possible to develop simple program to preform the following task:

If I have a list of drawing numbers contained within excel an file as such,

1-02632-M-07502 0002/03
1-02632-M-07502 0003/02
1-02632-M-07502 0004/08
1-02632-M-07502 0005/02
1-02632-M-07502 0006/02

(This is simply a list of text)

and I know that I have pdf files in a particular directory with names as such,

(located in K:\MBH\Projects\02632 Mystery Lake Road\0. Reference\2. PDFs)

1-02632-M-07502 0002.pdf
1-02632-M-07502 0003.pdf
1-02632-M-07502 0004.pdf
1-02632-M-07502 0005.pdf
1-02632-M-07502 0006.pdf

Is there a way that I can take the list of text containing the drawing numbers (See first list above), modify it so it becomes a list of text containing the appropriate file names?(See second list above)

Just to be more clear, by modifying I mean remove the slash and the 2 numbers following it, and add ".pdf" at the end.

Furthermore, I then use this list of file names to queue files to print to one my printers. (Remember that particular directory of the files is known)

Can all this easily be done with some sort of script or something?

I am using Windows 8, and I'd like to throw something together that would be as easy as pasting text such as,

1-02632-M-07502 0002/03
1-02632-M-07502 0003/02
1-02632-M-07502 0004/08
1-02632-M-07502 0005/02
1-02632-M-07502 0006/02

into the program and click print, while having it adjust and print everything automatically.

What do you guys think? Would it be possible to put something like this together?
 
Technology news on Phys.org
Sure.
What language do you want to write the script in?
For printing pdfs from a script you can use adobe reader's /t command line switch.
AcroRd32.exe /t filename.pdf
You have to use double \\ in most languages
"C:\\Program Files (x86)\\Adobe\\Reader 10.0\\Reader\\AcroRd32.exe /t filename.pdf"
btw. omitting the ".exe" in the command line causes an error on most computers because then acrobat reader won't be able to start in protected mode.
 

Similar threads

  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 19 ·
Replies
19
Views
7K
  • · Replies 89 ·
3
Replies
89
Views
6K
  • · Replies 75 ·
3
Replies
75
Views
7K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K