How to View a Google Spreadsheet Doc as a PDF - pdf

I would like to know if it's possible to view a Google Spreadsheet Doc as a PDF without first manually converting it as a PDF? I don't want to share a link directly to the spreadsheet, I want to share a link to a PDF version of it which ends up looking better (in Print View rather than Spreadsheet Document View)
I know I can Print > Save as PDF, then download to local machine, then upload and save somewhere on my server. But is there is a way to be able to view the spreadsheet as a PDF.
I have Google'd this and found nothing. The best I could come up with is the Google Document Viewer (https://docs.google.com/viewer) but that does not seem to give mt the option I am looking for. Further, I do not want to install any Chrome plugins, etc. because I want to be able to share a link to the PDF with people but not have to have them install a plugin to see the doc.

Unfortunately, what you are trying to do and the way you are trying to do it is not a capability within Google Docs. Sorry.

I think the best way is to use Google Drive API to write own script that will do this job. I mean:
You have a web server
Write a simple method in any web technology, such as PHP, Python, Java, C#, whatever you like and your server is able to serve. This method is connected to the google drive through it's API to your account, knows which spreadsheet to take care of and how to understand the columns. This spread should be parsed to HTML and with some popular tool (proper for your programming language or server's operating system) you create the PDF. The method should create HTTP response with header type: application/pdf.
You provide interested people with the link under which your method is available.
I guess this reference should help you to use Google API:
How to download the resources:
https://developers.google.com/drive/web/manage-downloads
How to convert (i.e. to PDF) and open the resources in your own application:
https://developers.google.com/drive/web/integrate-open#open_and_convert_google_docs_in_your_app
I hope this helps.

Related

How to download a file from a SharePoint though a website button?

I hope all is well,
I have a webpage that has a button and a SharePoint library.
Once the user clicks the download button, the document will be downloaded from SharePoint with a watermark of the user trying to download this file.
Additionally, I need to manage who can access or download the file.
Therefore, the main points to consider are:
User authentication to the SharePoint document library
Pulling the document from the website itself
Watermark feature
Thus, what is the most effective practice to achieve that and what should I use?
Thanks in advance
oh man, this is really an open and not quite detailed question 😟. Could you provide more context? what language are you using? have you already tried something and what is failing?
For now, the only help I may provide you is just general info 🙂:
User authentication to the SharePoint document library
if you are extending SharePoint or M365 with a SPFx solution you do not need to worry on auth. If it is totally aside I would recommend checking
https://learn.microsoft.com/en-us/graph/auth/auth-concepts
I would strongly recommend checking microsoft-graph-toolkit there is a mgt-login component
https://learn.microsoft.com/en-us/graph/toolkit/components/login
again here I would also recommend using MS Graph and endpoint like https://graph.microsoft.com/(version)/sites/(site-id)/drive/(drive-id)/items/(item-id)/content
I guess this is a very similar topic: Sharepoint Graph API download file from Document library that are not listed as drive ("Site Pages" and others)
Watermark feature
as for this I would take a look at Microsoft 365 sensitivity labels feature and read more about it here
https://learn.microsoft.com/en-us/microsoft-365/compliance/sensitivity-labels?view=o365-worldwide#what-sensitivity-labels-can-do
I hope this will be of any help. For sure it is a good start 🙂

Using Google Cloud or Drive to Programatically Convert Word to PDF

Candidates use my PHP application to upload their CV in either Word or PDF format. I want to convert the Word documents (doc or docx) to PDF. I have tried using on-server solutions (PHP libraries), but can not find one that is reliable enough so I am now exploring Google solutions.
It seems that the Drive API has just what I need. I can:
upload a Word document and request conversion to Google Doc.
export the doc as a PDF
delete the doc
The problem is that (as far as I can see), the only way I can access the Drive API is via OAuth 2, which is quite an overhead in the case of simple server-to-server access. I would prefer to use a simple API key.
As far as I can see, if I want to use an API key, then I need to sign up for a Google Service Account, which again seems like quite an overhead. (I only want to convert some files, right?).
Is there a straightforward way to achieve my goal (using Google resources)? Or are the two options above my only choices?
Your use case is a perfect fit for a Service Account. It's not really much of an overhead, say 10 minutes to set up the account and a couple of hours to write the auth code. If you would rather use a regular account, check out How do I authorise an app (web or installed) without user intervention? which has step by step instructions and sample code.

Is there to read the data from google spreadsheet link in IOS?

i am currently work on an IOS project which is required to read data from Spreadsheet in google drive. I have done some research and i found Google APIs client library for Objective C. However, i still have problem of retrieving data from spreadsheet. i find only the sample code that can read the file in drive from the drive that user login. But what i actually want in this project is using Google Drive as the Database. In short i want to retrieve data from the url like this https://docs.google.com/spreadsheet/ccc?key=0AoYC7S60-ywcdHVZYzh4ZlZ1Y3J5R2ZGbnBqY09jdkE&usp=sharing.
So is there a solution for this kind of problem? and if there a good site that provide a good tutorial to this kindda problem?
Google apps script is probably a simpler option. You can set it up as a web app, and read/write to the spreadsheet via the webapp. The google-spreadsheet-api is hard to use as there is little good documentation.
Refer, Google's Sample Code it can help you. You can also use GData Objective C Client to use it.

Is there any quick and easy way to upload a Google Doc from SAP?

We're creating a custom table in SAP comprising all of the information we need and the customer needs the report from this table uploaded to Google Docs. We do not use Business By Design. Is there any other quicka nd easy way to upload our report?
I don't know much about SAP but the Documents List API has methods to programmatically upload a document to Google Docs: https://developers.google.com/google-apps/documents-list/.
For instance, if you can export the SAP table as a csv file, that can be automatically converted into a Google Spreadsheet during the upload process.
You could also go with a no-programming required solution and install the Google Drive app on a machine with access to the files for automatic sync up to Google Drive:
http://support.google.com/drive/bin/answer.py?hl=en&answer=2374989
suggest you take a look at the SAP Developer Network (SDN) / SAP Community Network (SCN) where there is a project called ABAP2GAPPS that has done this.
Note the ABAP2GAPPS example is a bit difficult to figure out (but you can learn a lot from it), and it also uses the OAuth2 'authorization code flow" OAuth2.0 flow/pattern, which requires an end-user 'consent' in an browser pop-up...so if you want to push up a file from ABAP automatically from a background job without end-user interaction then ABAP2GAPPS is not the full answer (but again, ABAP2GAPPS is a great example, suggest you look at it.)
We recently were able to achieve an interface from SAP ABAP to the Google Fusion Table API using OAuth2, with only about a 100 lines of ABAP...and the techniques we employed could be used on any of the Google API's...here's a link to the video:
Link to YouTube video interface ABAP to Google API
hope you find this helpful

Embedding PDF documents into websites

I need to embed some PDF documents into a website. The last time I did this, I used a jQuery lightbox to popup an iFrame with the PDF document as the URL. The client's PDF viewer would then take care of the rest.
Apparently though, that was a bit buggy on some other peoples browsers. I guess it was due to the large PDF file sizes and the effort it took for their computers to fire up Adobe.
So I'm after ideas on how to go about this. How do you guys embed your PDF's into websites? Or do you just stick to adding a download link?
I often use scribd to solve this issue.
You have to upload your document (can be PDF, DOC or something else) to your scribd account and the service makes it possible to view this (pdf) document in a flash environment (perfectly embedabble with lightbox).
For this solution, a third party service (scribd) is required for your documents, but with their API it's possible to include all scribd functionality in your own website.
We have used Docuter
They let you embed and track
I've used Google Docs in Flash: http://trajctrl.tyblu.ca/?page_id=2
It's a bit buggy, but I find it works if you wiggle the image a bit - ie: zoom, click, etc. Download link is nearby just in case, too. Not exactly sure how it was done, as its a Wordpress plugin (Google Doc Embedder), but I imagine Google has an API somewhere.