Is there a script that can generate a PDF thumbnail in Google sites. Right now I'm using DocList to fetch the name and size of some PDF files in my Google drive and list them on Google Sites. I would like a script that can generate the pdf thumbail of those files as well.
No, You can not get the file icons programatically. You need to use icon images to display it in UI using UIService or HtmlService. You may check a example by Saqib Ali here. He is uisng UiService and DocList to display the Items in a collection.
Related
So for my class I have downloaded, and uploaded documentaries to gdrive I need to analyse. Though when I embed these google drive videos in notion.so (notion doesn't allow html type embeds, and only supports links without styling) the thumbnail will just be a random frame in the video. Is there any google apps script that can change the thumbnail to an image stored on my drive?
I am aware of this, but it is of no luck to me. (I do know that it is not a google as)
Thanks in advance!
In short,
No. At this moment in time the google drive api does not allow changing thumbnails of files, in which google drive provides its own thumbnail.
"If Drive can generate a thumbnail from the file, then it will use the generated one and ignore any you may have uploaded. If it can't generate a thumbnail, it will always use yours if you provided one." - Google Drive for Developers
I have been trying to determine the best approach to upload images from google forms to firebase. Currently, based on this Google thread, there is currently no way to grab the image.
Is there an alternative to grab an image from the Google Form and upload it to Firebase?
The Link to the upload folder is provided in the Form Editor
I have some data along with images in a Google Sheet.
I am sending the data as a JSON response and I have deployed the script as a web app.
I am using the code:
SpreadsheetApp.openByID("<sheet_id>").getSheets[0].getDataRange().getValues()
I am able to load the data properly but I am not able to load the images.
For the cells with image, I get Empty String.
Can you please suggest a way to load images using the same script?
If it can provide a URL to my image saved in the sheet, then also it will solve my problem as I just wan't to display the image.
At the moment, you can obtain the image URL but under very special conditions:
The image has to be defined as an "Over cell" image (it cannot be an "In-cell image", as they are not supported by Apps Script).
The images have to be inserted by URL (not by uploading it from your local system).
The way to do it would be to:
Obtain the Sheet you want the images of.
Obtain its images using the getImages() method.
Obtain the URL of each image by using the getUrl() method.
If you are interested in the possibility of obtaining "in-cell" images more easily, I suggest you visit the feature requests in the Google's Public Issue Tracker or consider creating a brand new one.
I have a client that uses Google forms to take orders and wants to be able to turn the resulting Sheet into a document of Packing Slips. Being a python person I am currently taking her .tsv and making nice HTML printable docs but want to be able to make a plug-in for her so that on any Sheet of this type she can click "Make Packing Slips" and it either opens a new tab with generated HTML (I'm ok using googles templating) or maybe even convert the HTML into a PDF and save it to her drive? Either way I'd rather design the document all in HTML and CSS rather than trying to make a google doc if at all possible. Is the feasible? Any starting points? Thanks!
You need to learn about Google App Script => https://developers.google.com/apps-script/overview
Then these Links should suffice
HTML Service: Create and Serve HTML
Google Container-bound Scripts for Google App Script (Can not post link for this due to low reputation)
I just had an idea to have a collaboratively worked-on public Google Drive document's contents displayed on my Web site. I was hoping this would be straightforward, as I am only going to extract simple text and the document is public, so no authentication shenanigans will bar my way.
I have looked at Google Drive REST API, but turns out I can only get file metadata and/or the entire document file. Not just the document content.
I do not wish to spend a day coding to do this, I thought it would be nice to have, but can live with just linking into the file directly from my Web site. Anyone tried this before? Anyone experimented with Google Drive API and has a feel for how much work would be involved?
If you are thinking of getting the content of a native Google document (like a Google spreadsheet or a Google doc), this is currently possible with the Drive API.
In the Drive API, for Google native document types you will have a series of 'exportLinks' as part of the metadata of the file. Each of these export URLs allow you to download the content of the Google document in a specific export format (like RTF, plain text, HTML, PDF etc...). Updating my answer...
See the documentation for this: https://developers.google.com/drive/manage-downloads#downloading_google_documents