Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hello,

I created a button below an object (a PDF file) in a container that says "print". Upon clicking it, I would like it to run a script to open the PDF file in that container, print it, and then close the PDF file. Any thoughts?

Greg

Posted

You can use the Send Event Script step with a batch file (say oppdf.bat) with the line

start %1

The script step would have oppdf.bat & " " & the_container_field.pdf. Trying to print this directly--not sure how--don't see any comman line options or any way to pipe it.

Posted

Thanks, but I think that's a bit over my head. I've never created a batch file before (I know what you're talking about though) and wouldn't I have to create one for EACH file? I guess the users will just have to learn how to double click on the object and print. I was just trying to save a few steps.... by making things newbie proof.

Greg

  • 7 months later...
Posted

Hello,

Now, months later I've been looking at the Send Event script step. If you use Send Event, select the file option, and feed it a file address it will open the PDF and print it; however, I would prefer to use a calculation to get the file name and print it that way. Can this be done without a batch script as you talked about previously? I have no experience creating batch files.

Greg

Posted (edited)

Set up a calc field that equals the container field and have the type set to text this will give you the file name and location if a referenced doc. when you set up your send event script rather than have it open file choose print from drop down menu.

select calculation rather than file in the radio button and select the new field as the calc.

now when you run script it will print the document with an option of having file opened in background

Edited by Guest
Posted

For those of you struggling with the file name spacing issue... try using Quote (fieldTO::textfieldname) as the calculation in SendEvent. It worked for me!

Greg

This topic is 7066 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
×
×
  • Create New...

Important Information

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