Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using Command line with ASP/VB

Posted on 2004-08-29
9
Medium Priority
?
264 Views
Last Modified: 2008-02-01
I have recently bought a program to help me merge pdf files (thanks to some EE help).  I am now faced with another situation.  I am sure this is an easy question, but I am at my witts end.  

I want to send the command via the command line.  The only instructions that I am given are the following:

To perform batch conversion or call conversion procedure from an automation script, you can use command line function in the PDF Split-Merge software, You can either run this tool directly from command line or call it from any script as well. The program supports the following command-line options:

PDF Split/Merge software v1.0
Copyright @2003-2004 www.verypdf.com Inc
arguments: file1 [file2 ...] destfile
arguments: burst C:\input.pdf C:\output
Example:
pdfpg C:\A.pdf,1,3 C:\merged.pdf
pdfpg C:\A.pdf,-20,50 C:\merged.pdf
pdfpg C:\A.pdf,1,3- C:\merged.pdf
pdfpg C:\A.pdf,1,2,3 C:\B.pdf,5,2,9 C:\merged.pdf
pdfpg C:\A.pdf,1,1-9 C:\B.pdf,5,2,9 C:\A.pdf,10 C:\merged.pdf
pdfpg burst C:\A.pdf C:\split



My question is...how do I access the command line?  I have tried several things, but to no avail.  Please let me know if you need further information from me to help me get this accomplished and of course I am pressed for time on this.

Thanks, J
0
Comment
Question by:Jbryant22
[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
  • 6
  • 3
9 Comments
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 11926458
ARe you trying to run this from within an ASP page? To run command-line options, you need to use WScriptShell or ASPExec--however, I think that these command lines you refer are supposed to be entered directly into the Split/Merge software program

FtB
0
 

Author Comment

by:Jbryant22
ID: 11926472
I am trying to run this from within the ASP page.  I am working on getting it to run with the shell command.  According to the little directions that I was given, in a perfect world a developer should be able to combine the documents on the back end.

Right now I have:

Dim WshShell
Set WshShell = Server.CreateObject("WScript.Shell")
WshShell.Run  "C:\PDFSM\pdfpg c:\docs\a.pdf c:\docs\b.pdf c:\merged.pdf"
Set WshShell = Nothing

PDFSM being the folder I installed the software in.
but it doesnt seem to be working
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 11926473
To run the command line in ASP, try:

<html>
<body>
<Script language=vbscript runat="server">
    Dim objShell
Set objShell= CreateObject ("WSCript.shell")
objShell.run  "cmd /K CD C:\temp & pdftohtml.exe a.pdf & exit"
Set objShell= Nothing
     
</script>
</body>
</html>

Or try using the free ASPEXEC near the bottom of this page:

http://www.serverobjects.com/products.htm

FtB
0
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!

 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 11926476
The next thing that you need to do is to give the IUSR_ and IWAM_ accounts READ/WRITE permissions to all of the directories where you will be working with your .pdf files.

FtB
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 11926478
Also, are you getting any errors or anything like that?

FtB
0
 

Author Comment

by:Jbryant22
ID: 11926487
nope, that is what is bugging me.  It acts like it is running correctly, but it is not creating the file.
0
 
LVL 46

Accepted Solution

by:
fritz_the_blank earned 2000 total points
ID: 11926492
Okay, I am surprised that you aren't getting a permisssions error, but that is most likely what is happening here.

I would consider putting all of the .pdf files in the subdirectory of PDFSM like this:

C:\PDFSM\Source
C:\PDFSM\Merged

and then give liberal permissions to the PDFSM directory and the subdirectories.

FtB
0
 

Author Comment

by:Jbryant22
ID: 11926507
ok, now i have full permissions on the folder for everyone and I am getting a permission denied.

I will play around with it.  Thanks for all of your help.  If you were to think of anything else, please let me know.
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 11926519
Sure--keep in mind that the IUSR account may not be part of the everybody group for security reasons, so it is important to set that separately. Also, try running a simple .bat file to get that working first so that you know you have the permissions set correctly.

Good luck,

FtB

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

705 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