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

Download a PDF in a web viewer via script


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

Recommended Posts

Posted

I have a PDF being displayed in a web viewer. I would like to download that pdf to a specific location via script. This is on a mac and plugins are an option.

History and caveats:

This file is generated by a servlet. The servlet tracks the session of the web viewer and prevents opening the URL from anywhere but the webviewer. I cannot send the URL to Safari, use CURL (if that's even possible normally), scriptmaster's get URL, etc. because they all make their requests outside the webviewer and so the servlet refuses the request.

I can, using the acrobat plugin, download the file manually using the save to disk, but the point is to automate this. I can also change the safari plist to disable PDF support forcing all PDF URL's to automatically download but then I will not be able to display PDFs within the solution for other purposes.

What I would like to do is grab the current content of the web viewer, a pdf, and save it to a directory. I am hoping one of the uber-techies knows a way to get at that content.

Posted

Thanks for the reply.

I'm using MBS currently but there was no function that could grab the contents when it was a file. However I wrote to Christian at Monkeybread Software about what I needed and he hooked me up with a brand new function in a matter of hours. Now I can pull the file right out of the web viewer. Very sweet!

Again, props to Christian for his lightning fast response and totally hitting the nail on the head!

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