ljensen1 Posted November 26, 2016 Posted November 26, 2016 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?
webko Posted November 28, 2016 Posted November 28, 2016 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.
Ben360Works Posted November 28, 2016 Posted November 28, 2016 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.
ljensen1 Posted November 28, 2016 Author Posted November 28, 2016 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?
Ben360Works Posted November 28, 2016 Posted November 28, 2016 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.
Recommended Posts
This topic is 2984 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 accountSign in
Already have an account? Sign in here.
Sign In Now