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

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

Recommended Posts

Posted

Good morning.

I have a solution that generates a PDF from a series of tables, appending various pages to the report.
Sending it via email is fine, even saving it to a fixed file location, but I am experiencing difficulty in being able to save it in a container field so the user should be able to click on it and view this PDF on the screen.
How do I save this please? I don't get an error in the solution (or script debugger), it just doesn't appear in the field.

Any suggestions please? Many thanks in advance too. :)

Greg

Posted

Hi Greg. Create a filepath variable, eg $fpath = get(temporarypath) & "mypdf.pdf"

save the pdf to $fpath

then use the script statement  Insert PDF , using $fpath

 

 

Posted

Hi there,

Thanks for getting back to me.

Getting the PDF file to save to a disk location hasn't been a problem ($fpath), but inserting it into a container field is eluding me. Unless I'm doing something wrong, the Insert PDF command only allows a string to be entered - file path etc - not a [container] field to copy/move it to.

What am I missing please?

Greg

Posted

It's hard to tell what you're doing wrong when you don't show us exactly what you're doing.  If you're using Insert PDF, then you must make sure that:

  • your file path begins with image, imagemac, imagewin, or imagelinux;
  • the target container field is the active layout object;
  • the selected instance of the container field is optimized for PDF.

For a scripted process like this, my preference would be to use Insert File, since it can work entirely at the data level. 

Posted

Hi Comment,

I never had a problem creating the PDF or where it went - that was all fine - yep, I use the correct file path.
Target field was the active layout object too.
What was not working was the actual Insert PDF command. Debugging gave me a File Missing (100) error on that step whether I used variables or fixed locations. I tried many combinations.

I tried an Insert File instead and it worked fine first time. Thanks for that idea.
I'm not sure why Insert PDF is not working, and I will follow this up later.

Thank you for helping me get it working. :)

Greg

Posted

Hi Iain,

Looks like you got cutoff, but yes, the Insert File worked whereas Insert PDF did not.
It's all happy now.

Thank you to everybody who helped me.

Greg

This topic is 2005 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.