Jump to content
ljensen1

Download PDF from URL

Recommended Posts

I use tpdf to create pdf files from a FileMaker database.  This results in a URL that opens the "Save As" dialogue box. I would like to have a FileMaker script that will opens this URL and automatically saves the pdf to a programmed-in location.  Will SuperContainer do this?

Share this post


Link to post
Share on other sites

I don't know about SuperContainer but...

For security reasons, you can't bypass the Save As from a browser (think about the fun malware creators would have if the browser would simply save the contents of a URL to an end users hard drive...)

But - FileMaker has an Insert from URL script step, and an Export Field Contents script step.

So, if you can know the URL, you can insert to a Container field, then export the contents to a known location.

Share this post


Link to post
Share on other sites

Depending on the URL you get back, you might be able to just pass it in to SCSetContainer as the 'data' parameter and have it save to a folder on your SuperContainer server.

Share this post


Link to post
Share on other sites

Thank you both for your suggestions.  I'll give the Insert from URL script a try.

Ben, my URL leads to a php page that can either (depending on how I code it) 1) create a pdf in the browser, or 2) create the pdf and open the "Save As" window so the pdf can be downloaded.   If I use SCSetContainer, do you know if I would end up with the pdf or the code?

Share this post


Link to post
Share on other sites

The path you give SC will need to be a direct path to a file. If the first option is a link to a '.pdf' file then it should work but if it is a link to a .php site with some parameters, I'm not sure.

Share this post


Link to post
Share on other sites

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

  • Who Viewed the Topic

    1 member has viewed this topic:
    hutchlad 
×

Important Information

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