Jump to content

Send Event in Windows


This topic is 5662 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi Gang,

This one has got me stumped . I am trying to create a Send Event script that uses a command line application that will turn a pdf into a jpg. I want the ability to do this for every record in my table. This is the script calculation that I am using.

"c:/Progra~1/PDFtoJPG/pdftojpg.exe -i " & Items::PDF Path & " -o " & Items::Folder Path & " -r 150 -q 100"

The first part that calls the program works fine as my "Program Files" folder has been shortened to "Progra~1". Where I get into trouble is in the path for the input and output files. These are typically long name files and folders. When I execute the script, I get back an error that it cannot find the file name, which got truncated at the first "space" found.

Does anyone know how to solve this?

Thank you very much!

Link to comment
Share on other sites

Thanks, I tried this (to test if the command line application launches) but it did not work.

Quote ("c:/Program Files/PDFtoJPG/pdftojpg.exe -?")

I get a "file could not be found" error> My path is correct.

I did try this and it worked, but its going to be difficult if I store the application o a server path.

"c:/Progra~1/PDFtoJPG/pdftojpg.exe -i " & Quote(Items::PDF Path) & " -o " & Quote(Items::Folder Path) & " -l 1 -r 150 -q 100"

Any ideas?

Thanks again!

Link to comment
Share on other sites

Thanks, I tried this (to test if the command line application launches) but it did not work.

Quote ("c:/Program Files/PDFtoJPG/pdftojpg.exe -?")

The quotes only need to go around the path to the executable and the file, not around the parameters.

Quote ("c:/Program Files/PDFtoJPG/pdftojpg.exe") -?

should work, but if you want to see the result you need to prefix the command with "cmd /k" to keep the command window open.

Your second approach is correct.

Link to comment
Share on other sites

This topic is 5662 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.