How to implement PHP / jQuery Online Document viewer? - php

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 ;)

Related

How to embed Power Point on html page

I wanna insert PowerPoint file from my host to my Web Page. But without Google Drive.
Can i do it with
<code><object type=...</code>
There is few ways for embedding a powerpoint file into your HTML, if you do not prefer using Google docs, you can always use SLIDESHARE or DROPBOX or any third party that provides similar service.
If you prefer to host your files on your own host then you would need to setup a flash player for powerpoint files.
This link seems to have few examples for such players.

What are server requirements to setup Adobe Streaming video which deliver videos on user computer in f4f file format?

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.

Show pdf file into browser without Adobe Reader

I need to open pdf file into browser without Adobe Reader. Is there any API with php which open PDF files into browser.
Regards
No.
PHP runs on the server. The only "browser API" it has access to is HTTP.
If you want to render a PDF on the client, then the client needs a PDF renderer. There are JavaScript PDF readers, but I can't comment on their cross-browser support or maturity.
You can use SWFTools to convert PDFs to Flash. But SWFTools default skins are not looking good at all, so you can check Flexpaper as a viewer.
In case you are going to make your own skin, then could be useful to read: SWFTools (pdf2swf) to properly work with Flex
Another solution is pdf.js (as Quentin point out), but AFAIR this script was not usable(back then, when I looked for) for PDFs with complex structures (complex gradients for example).
If you need to publish documents as "private" you should look at services as Issuu or you will have to protect files from downloading.
If you pdf files are put online and not restricted, you can try using Google Doc Viewer. It's a very nice way to put the Viewer in <iframe /> so that it can be combined with your web page.
https://docs.google.com/viewer
It is not feasible to view the PDF files without a viewer like Adobe Reader. If you just don't want to use Adobe Reader, you may try a PDF viewer plug in for web browser from some other company.
However, if you do not want to use a viewer at all and want to write/build your own viewer then a better option is to convert the PDF to scalable images and then show them on the web page using image tags. You can also create such a viewer using JavaScript.
Even you can find many already available JavaScript based viewers which can show those images.

How to embed PDFs that work in all web and mobile browsers

My client asked me to create a page which contains PDF. I used Embed, Iframe tags, it worked in Mozilla but did not work in IE and Mobile browser.
I know that all browsers will read .pdf directly but I want it to be embed.
Is there any way?
Please help me..
If you give a link to the PDF on the web page, any browser will be able to download the file and then the user can open it in a PDF viewer of his choice.
If you want to embed the PDF document in a web page, then the browser needs to have a PDF plugin installed. This may not be the case with all browsers. The PDF will be displayed only if the PDF viewer application's plugin is registered with the browser.
The other way of embedding the PDF document is to use a server-side component that renders the PDF as ordinary HTML web page elements. Google has an embeddable PDF viewer.
Google Docs offers an
undocumented feature that lets you
embed PDF files and PowerPoint
presentations in a web page. The files
don't have to be uploaded to Google
Docs, but they need to be available
online.
You can also use Mozilla's pdf renderer written in javascript. It is rather complex getting started, but all options are there. It is the pdf reader available in Firefox and extensions exist for other browsers. Fun fact: It is by far the most starred library on github when searching for pdf.
Try using adobe pdf api, i found is very easy and compatible with all browsers.
https://www.adobe.io/apis/documentcloud/dcsdk/pdf-embed.html

How to let users read p7m files online

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

Categories