• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 488
  • Last Modified:

VB Script and PDF Files

I'm really just throwing a line out there, but can anybody recommend any software to me that I can use to script PDF files?  What I'm trying to do is create a script (prererably VB) that can merge two existing PDF files.  I can do this manually in acrobat, but I'm trying to figure out how to script it and I don't know how.  Can someone help?  Thanks so much!
0
tphelps19
Asked:
tphelps19
  • 2
  • 2
1 Solution
 
AmazingTechCommented:
Use GhostScript.

Download from:

http://www.brothersoft.com/ghostscript-download-64547.html

The command line would be:

"C:\Program Files\gs\gs8.63\bin\gswin32c.exe" -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=c:\Merged\AllinOne.pdf "c:\Folder\Document1.pdf" "c:\Folder2\Document2.pdf" "etc..."

Of course you can put this in VBScript with

RunThis=Chr(34) & "C:\Program Files\gs\gs8.63\bin\gswin32c.exe" & chr(34) & " -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=c:\Merged\AllinOne.pdf c:\Folder\Document1.pdf c:\Folder2\Document2.pdf etc..."

Set objShell = CreateObject("Wscript.Shell")
a = objShell.run(RunThis, 0, True)
Set objShell = Nothing



0
 
tphelps19Author Commented:
That's awesome.  I don't think I've seen a more clear description of how to do something.  Why can't everyone be as descriptive as you?  ;)
Thanks again!
0
 
tphelps19Author Commented:
AWESOME RESPONSE!
0
 
AmazingTechCommented:
I usually try not to add alot of fluff as many people don't need it.

I show you what you need and how to do it. Sometimes I'll just post a script and say "Try this."

Of course some beginners may come back and ask more questions which is fine but if I tried to explain every little detail everytime sometimes it gets confusing.

For VBS you will need to add in some quotes for folders or files that contain spaces but more would already know that.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now