Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Program for printing a list of PDF files

  1. May 1, 2013 #1
    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?
     
  2. jcsd
  3. May 1, 2013 #2
    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Program for printing a list of PDF files
  1. Program to read file (Replies: 5)

  2. PDF files (Replies: 3)

Loading...