[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

VB Script and PDF Files

Posted on 2009-05-13
4
Medium Priority
?
486 Views
Last Modified: 2012-05-06
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
Comment
Question by:tphelps19
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 21

Accepted Solution

by:
AmazingTech earned 2000 total points
ID: 24377447
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
 
LVL 2

Author Comment

by:tphelps19
ID: 24378516
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
 
LVL 2

Author Closing Comment

by:tphelps19
ID: 31581088
AWESOME RESPONSE!
0
 
LVL 21

Expert Comment

by:AmazingTech
ID: 24379328
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
In this first video of the three-part Xpdf series, we introduce and describe Xpdf, a library containing nine command line utilities that perform various functions on PDF files. We show where the library is located and how to download it, discuss its…
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question