Viewing uploaded .PDF or .DOC as pictures without converting - javascript

Recently, I am working on a feature which the user could upload files like .pdf or .doc and then viewing them as pics on the web page. I am wondering is there a way that I can do that without actually converting them to .jpg or .png by a third party software on the server? Is it possible to implement this feature only us js,jquery and django?

Not sure about .doc you would need to go and convert that into PDF. You can show PDFs by using created by Mozilla
pdf.js

Related

how to preview images , pdf , video files on my web page stored in a folder on my server?

I have uploaded and downloaded files using PHP, I want to preview different types of files (images, videos, pdf, power point...)
Is there any free API like this http://filepreviews.io? And could I code it by myself?
You can use standard PHP mime_content_type function.
Look for its documentation here: http://php.net/manual/en/function.mime-content-type.php
It will NOT read the file itself, but will just return its mime-type based on file extension. I hope that will work for you.

Problems in opening local .doc and .xls files in ionic framework

I am build an ionic app and I am almost done. Now I have a problem. whenever user clicks on attachments in my app.. there are .doc, .xls, .jpeg, .pdf files. I am getting the base64 code converting it and generating a local url. I can open Pdf and all image files but I have problems in opening .doc an d.xls files. Could anyone suggest me how to open them ..Thanks in advance :)

Can Fine-Uploader Parse PDF Pages into Thumbnail Images

I am working on a website that has a need for a file uploader that integrates well with forms and potentially S3. Fine-uploader looks like a great fit for us. We will be, however, adding a PDF splitter/merger so users can drop one or more PDF files and pull specific pages out and send them as one document. I may need to find a separate JS library to render the PDF pages as image/thumbnails for interaction, but wondering/hoping fine-uploader could handle the page thumbnail rendering similarly to how it does so for image file, but giving a thumbnail for each PDF page.
Fine Uploader does not natively preview PDFs. If you'd like to generate previews for PDFs client-side, consider using a library specifically for that purpose. One possible choice is pdf.js. You can use Fine Uploader's API to get a handle on the PDF file (uploader.getFile(id)) and then pass this file off to pdf.js. Note that you may have to convert this file into a typed array first using FileReader.

How to view/open .doc file from sd card inside android app

I have requirement to view .doc file inside android app, I have gone through many related post but still not clear what to do.
I have tried :
aspose word api for android I got api for creating .doc file but there is not a specific method to view .doc file.
I gone through apache POI but there is i have to write function for render content.
Embedding .doc inside Webview Does not work for local files.
Olivedoc Library is missing.
Please suggest me if there is any library for .doc file same as pdfViewer for PDF.
Thanks.
Look here. AFIK there is no library for rendering such files in android (Correct me if I'm wrong). You have to create an intent to open your file in an external app, as described in the linked question.
If you want to render the new .docx or OpenOffice .odp files, there are various libraries (search on github).
I know this is not what you want to hear, but there does not seem to be any way to do what you want. (BTW, WebView does work for local files, but cannot render .doc files.)

How to secure PDF files from download but allow it to View?

I want to integrate some kind of web based PDF viewer so that user can not download the PDF files but they can View them. This is for securing the PDF files from downloads. Something like scribd.com
See example here : ref link
I used FlexPaper: flexpaper.devaldi.com
This compile PDF in SWF, so is more protected.
I think you need something like pdftohtml.
It is a tool based on the Xpdf package which translates PDF documents into HTML format.
You could use Flexpaper, too, but it's free of charge only for open source projects...

Categories