Program for printing a list of PDF files

AI Thread Summary
A user is seeking to create a program that can automate the process of converting a list of drawing numbers from an Excel file into corresponding PDF file names for printing. The task involves modifying the drawing numbers by removing the trailing slash and two digits, then appending ".pdf" to generate the correct file names. The user is using Windows 8 and desires a simple interface where they can paste the drawing numbers and initiate printing automatically. Discussion participants confirm that this can be accomplished with a script, suggesting the use of a programming language suitable for file manipulation. They recommend utilizing Adobe Reader's command line options for printing PDFs, specifically mentioning the "/t" switch for printing files directly from the command line. Additionally, they note the importance of correctly formatting the file path, including the necessity of using double backslashes in most programming languages to avoid errors. Overall, the feasibility of the project is affirmed, with suggestions on how to implement the printing functionality effectively.
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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
What percentage of programmers have learned to touch type? Have you? Do you think it's important, not just for programming, but for more-than-casual computer users generally? ChatGPT didn't have much on it ("Research indicates that less than 20% of people can touch type fluently, with many relying on the hunt-and-peck method for typing ."). 'Hunt-and-peck method' made me smile. It added, "For programmers, touch typing is a valuable skill that can enhance speed, accuracy, and focus. While...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...

Similar threads

Replies
16
Views
4K
Replies
8
Views
2K
Replies
19
Views
6K
Replies
89
Views
5K
Replies
75
Views
6K
Replies
8
Views
2K
Back
Top