Insert hyperlink from form to pdf - google-apps-script

I'm trying to link a questionnaire composed in Forms to a pdf document. Ideally I'd like to web host the document and link directly to a page or section of said document.
Is there a way to, using script,
include a named hyperlink in a Form? And,
make the link point to a web hosted pdf at a particular page or section?
Thanks in advance,
Zak

This is image was taken from a PDF and saved as a jpg. And then uploaded to a form.
Here's an example of adding an image to a form:
// Open a form by ID and add a new image item
var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
var img = UrlFetchApp.fetch('https://www.google.com/images/srpr/logo4w.png');
form.addImageItem()
.setTitle('Google')
.setHelpText('Google Logo') // The help text is the image description
.setImage(img);
Here's the link to reference documentation.

Related

How do we pass PDF Hyper Link value to HTML page or ASP.NET Page

I have a lot of PDF Documents and it contains inside Hyperlinks (EX: [EMP-001] on every page.
When the user clicks the link "EMP-001" in PDF, I would like to pass the value "EMP-001" on the web page (either HTML or ASP.NET Page).
pls. guide us on how to proceed...
we are struggling to find the exact solution...

Display images by url in google app maker

I have a model with url images in this format "https://drive.google.com/file/d/< id >/view".
Urls are referred to images stored on my Drive.
I have an image widget into form binding to the url in images model.
When I preview the app, the url works as href but image is not displayed in the form.
What's wrong? Someone can help me please?
Take a look at Images Sample(https://developers.google.com/appmaker/samples/images/), it does exactly what you want. Just in case, the 'prestige' of that sample is hidden behind this line of code in onCreate method of the DriveImage model:
record.ImageUrl = Drive.Files.get(record.Id).webContentLink;

GAS & HtmlService embedded in google site href management

I'm working on a Google Site:
An input page uses HtmlService with a form that fills a line in a spreadsheet.
An edit page shows the data with handsometable gadget.
In every handsometable's line, there is a link to edit some information using the same script of the input page.
All works fine, but I have some problems after submit.
In the input page it's ok, with this code
new input
The href is filled with the script url, clicking the link I go to input page.
In the edit page I'd like to go back to the page with the table, with this code:
table
but using the link I open the Google site in a frame into the page..
can i do something?
Thanks
Marco
Hope this image better explain the question...
some snapshoots http://imagizer.imageshack.us/a/img537/3748/OUzFV1.jpg

Give hyperlink to download image without image name

I am using QR code API from this website. It generates QR code image from the URL input we give to it. For example, I am showing the QRCode of data 'abcd' on my website by adding an <img> tag of src=https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=abcd. This shows the QR on screen, but I also want to give a download link to that image. Suppose if a user clicks on that image, it should get downloaded. How to do that? I am confused because the image is getting generated dynamically and I dont have a name or specific url to it.

share iframe with specific content

Lets say i have a website called http://123.com.
The index.html page of the website contains an iframe called theframe.
i have three different page (1.html, 2.html, 3.html) for the iframe content and they will be displayed when i click specific button in the site. The default content of the iframe is 1.html.
My question is, if i need to share http://123.com with 2.html or 3.html displayed on the iframe, how should i write the link on facebook/blog/IM to share? Is there a way without modifying the website?
Thank you.
you have hard coded value in iframe src
use querystring
make a parameter named dstntn palce in your url
http://123.com/?dstntn=your_url
and then get it in a var by $_REQUEST['dstntn'];
and give var to iframe src
then change iframe by changing dstntn value by 1.html || 2.html
NOTE: read encoded and decoded form for query string i think dots are not acceptable