Button to open pdf file?

hello. I have a file column with i attach a pdf file
then i have another column with parsejson pdfURL to display it to another canvas column.

However sometimes the display is not working. So i was thinking to have button column to open PDF file like in the first photo (when i click the file directly, it will display pdf, but i want to use button instead of clicking at the file)

is there any way to do this? or any formula for the button


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

@Rickard_Abraham thank you very much, this is exactly what i want. even it opens in a new window - it works well for me.

i take a look at your pack and it is very cool. Does it support Thai language and all?

Good question! I did a little test and it seems pretty good except it fails for some accents, at least in this sample pdf

ReadPDFs("https://www.pickup-thai.com/podcast/CreamyCoconutPod2.pdf")

image → image

I tried different encodings but it just made it worse, not sure where it goes wrong, could be something weird with the sample doc too.

OCR Pack

My OCR Pack seems to do better with these characters for some reason!

Please consider my free two week trials to check them out yourself :orange_heart:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.