Button to open pdf file?

Hey there!
I did some research and found a nice solution that Coda uses themselves when you run Embed() on a PDF.

You can simply give the URL to Google’s Docs Viewer, something like this for a button formula:

OpenWindow("https://docs.google.com/viewer?embedded=true&url=" + thisRow.PDF._Merge().ToText().ParseJSON("publicUrl"))

And thanks to you, I added this functionality to my PDF Pack, it gives you a cleaner formula for getting the URL:

image

Note that it’s opened in a new tab, not exactly what you asked for

4 Likes