viewing pdf and other files in iframe without downloading - iframe

I am developing a doc viewer in Microsoft dynamics365 to show documents stored in separate database. We have an api which helps us to download those files. So far I was using Iframe to view those doc files, it works for img and txt files but fails for pdf files.
one of the possible solution is converting to file url to base64 but I'm not sure that's the right approach

Related

Cannot download PDF stored in Firebase storage using download URL

I uploaded a PDF file to firebase storage and I clicked on the generated Access Token to copy the download URL. I pasted the download URL in the web browser and the PDF opens in the browser. But I actually want the PDF to download instead of opening in the browser. I tried this with other file types such as zip files and when I paste the download URL on the browser it begins to download. I wonder why PDF's do not download?
PDF stored in firebase storage
Getting download URL from access token
Is there any way to make the PDF itself downloadable without compressing it?

How to programmatically download zip files shared in google drive via form?

I have a google form that accepts file uploads, all of them in zip format.
That form generated a spreadsheet, where each row has a link with a unique uri, that represents a zip. I want to download all of these zip files to disk.
Using gspread it is easy to get all the URIs. However these do not have .zip extensions, and they seem to be google drive paths.
I've tried extracting the ids from the URI and using the requests package to get:
https://drive.google.com/uc?export=download&id=DRIVE_FILE_ID
https://drive.google.com/u/2/uc?id=DRIVE_FILE_ID&export=download
but neither of these approaches seemed to work.
It seems like the URI is linking to a preview of the inside of the zip, but I can't figure out how to simply download it programatically. Clicking on hundreds of links and downloading each by hand isn't really an option.

Display word document in flutter app from url

I have a docx file saved on firebase and I want to render this documnent in my app so not using an external app to open the document as a number of file libraries do. I have tried flutter_filereader which works perfect for a file on my phone however i cannot use it to open a url. Is this possible? I think converting it to a pdf would work as I can display those from a url, however I cannot find a library that will allow me to convert files to pdf before uploading to firebase?
Any help is much appreciated
You could display the url in-app using flutter_webview https://pub.dev/packages/webview_flutter
You can do this with a simple API call to PdftronFlutter.openDocument
Follow the this link https://www.pdftron.com/blog/flutter/build-a-document-viewer-in-flutter/. This blog said the usage of PdftronFlutter.

How can I view an uploaded docx file in asp.net

I am working on a download management system in asp.net and I can upload and download a docx file. I want to view the uploaded file. I tried using google API but looks like I have to upload the file in google drive itself in order to be able to view it from google drive. I don't want to upload the file in google drive. Is there any other API that helps me to just view the uploaded docx file?
It would be even better if it can be viewed as well!
Use an iframe to embed File.embedLink, documented on
https://developers.google.com/drive/v2/reference/files#resource
I assume you know how to upload files in ASP.net
Using Office Web Apps you can achieve that, provide like of your uploaded document on your site, when the user clicks it will open in the browser it self Link, Read the documentation
Here is the link for API Site

Read and show the content of DOC & DOCX file in asp.net page

Suppose user will upload doc or docx file through our asp.net web UI and after then we want to show the content of that doc file in our web page. So please tell me which library I need to use in my asp.net web project for reading the content of doc file and convert to html and then save the html to database. So I stuck that how to read and convert to html the doc file content. is there any good libarary for this.
Answered perfectly in this question

Resources