i'm running a php/mysql based website.
I already let my users upload p7m files (most of them are pdf digital signed).
Is there a solution to let users watch them on site (online) directly without download them? Like google does with pdf, or rtf files?
Thank you
S.
If these files are just MIME blobs, then extract the main part and display it (for text/plain or /html content). Any existing file signature has no impact for displaying.
Regarding the embeddable PDF viewing, this is probably a sufficient option:
http://googlesystem.blogspot.com/2009/09/embeddable-google-document-viewer.html
Related
I'm developing a new website with PHP & MySQL.
The website is for an online eBook library that grant access to its books based on paid subscription plans.
So, I need to make sure the PDF files of these books are well protected and can't be saved, downloaded, or in anyway copied.
How can I do that?
I suggest you to convert the PDF into an image , and display the first page or as you like, check this library it can be useful
Imagemagick
I think this is not a PHP or MYSQL solution. PDF's have a "protected mode". There you can disable printing the pdf. You should look for a server side pdf recreation tool that can recreate the pdf in protected mode and serve the user this file. Take a deeper look into PDF functions. I think i can remember that there should also a trial mode also and the ability to view only on 1 device.
Here a link for more info: http://www.dummies.com/software/adobe/acrobat/restrict-who-can-edit-or-print-pdf-documents/
You'll be able lock down the files from unwanted downloads. But redistribution or sharing login details will be a battle.
Some options I can think of
Option 1:
You can handle this yourself on the server. Housing the PDFs outside of the public Apache directory (so there is no way a URL can reach it). Then with a PHP function read the contents of the file and stream it to the browser.
Streaming a large file using PHP
Option 2:
Use something like AWS S3. You can lock down the bucket so there is no public access. And generate signed URLs as needed. They'll be unique urls which you can specify a time limit of availablity. AWS S3 The security of a signed URL as a hyperlink
I am showing PDF, Video file preview in my web application, but i want to give only read access to users, no one can`t download PDF & video files, I want to prevent users, how can we prevent users to download it using PHP ? only they can view, please share you ideas as soon as.
Thanks
Any content that is shown on the client's side, technically speaking, already downloaded to the user's machine. If the user is seeing the PDF file - it's already been downloaded.
For video: it's not that straightforward, you can organize a streaming of the video. It'll be fairly more complex for the user to download it as one file, but still, can be captured.
Recently I've got requirement to set streaming video. To set this which allow mp4 format to download is easy but my boss want to use Adobe streaming server which allow user to watch videos in many chunk of f4f file format. I am not aware of server requirement for this and don't know what kind of coding is required for this. Can anyone point me in right direction please? I am all good with PHP, HTML5, jquery and OOP. I am thinking to user laravel framework for this project. What do you say? What about flash player? Any help and comment appreciated.
Thanks..
The simple answer is that both parties need to have the CODEC for the f4f file format on their respective machines. Computers are what computers are, you just have to tell what it is. If the very same .mp4 file has had a different file extension put on it, say .txt, then of course the OS won't see it as a media file. A file format is as a file format does. Both machines have to have the same software drivers to read and render the files.
Doing some research on trying to secure documents on a server so that visitors cannot copy paste the content.
Users can upload documents as pdf, doc, docx, and currently they can download these files in staging enviroment. Anyone know of a way I could either upload these as read only so once they are downloaded they cannot be edited or copy pasted etc?
Or is there a way I could get the contents of these files and display the content on a webpage while disabling copy paste etc?
Just looking for some ideas on a solution for this.
You cannot control web browser behavior.
The only way to do that is to use a script to render a part of a document.
For example, rendering page by page in a web view. But user could copy/past content even if you deploy some Javascript.
Perhaps, you should take a look to Flash, Silverlight or Java applet.
I think there are few solutions that can limit access to read only.
But il will mainly limited to computers.
You can protect a file with a password too.
Files could be downloaded but only users owning the password could edit them.
This is the case for PDF files, Excel files, etc.
It's a way but I don't think it's the best way.
I think the easiest way is to convert your documents as PDF files and to limit actions to read only by adding a password. You ll be able to disable write permission, print permission, etc. And rendering a PDF on a web page is very simple.
My Application is developed in PHP Yii Framework.
My Application has a private network module where members of the network can upload files for sharing among them. Right now I'm using Amazon S3 to save the files.
Is there any way I can provide an option to generate Preview for these files so that the user can view them online before downloading the file.
Here is what I've come across in my Research:
Group Docs:
http://groupdocs.com/pricing/api-pricing. This is paid version and I'm not sure about the privacy of my documents.
Zoho Docs
https://www.zoho.com/docs/
I'm not sure if they have an API to support the document viewing feature.
Google Drive(Formerly Google Docs)
https://developers.google.com/drive/
I'm not sure if I can only open the documents using Google Drive and not save to them on google drive.
These files are extremely private and security is of very high concern in my application.
If any one has any suggestions / thoughts for this scenario, please share them with me.
Thanks
Please try this link it will help you
Document Viewer is a jQuery plugin that allows you to view several file formats directly in a web page. The file formats that Document Viewer supports are:
PDF Files
Text Files
Code – bsh, c, cc, cpp, cs, csh, css, cyc, cv, htm, html, java, js, m, mxml, perl, php, pl, pm, py, rb, sh, xhtml, xml, xsl, sql, vb
Images – png, jpg, jpeg, gif
Audio – mp3, m4a, oga, webma, fla
Video – m4v, ogv, ogg, webmv, flv,mpg, mpeg, mov, divx, avi
Yeah can be done i am using it .
2 choices for multiple file types :
Use Google doc viewer 5 simple fast some restrictions and free )
Use Pdf.js which is very good at displaying pdf dynamically without making every page an image like Google viewer do ! , and you can search and select text and others amazing stuff , this is used on Firefox .
OR try paid services they have even a 3D view for document ;)