Upload a PPT file and see it like a presentation - javascript

The upload part is OK!
My problem is open that PPT file and show like a presentation.
I have no idea how can I do that. My server side language is PHP.
Thanks

Your client needs to have MS-Powerpoint, or at least MS Powerpoint Viewer, installed
Your browser needs to be capable of ActiveX
Ideally, you can also configure your server to send the file as MIME-type:
"application/vnd.ms-powerpoint":

Related

PDF.JS Preview large pdf file (> 200MB) on client side, that was sent from server side

I'm working with a pdf viewer, that will load a pdf file from server (nodejs) and then rendering on client side to allow user reading direct in my site.
I'm using pdf.js to rendering pdf file on client side. The problem is client side must download entire pdf file before they can parse and render it, so if the file is too large (~200MB in my case), user must wait for download entire 200MB.
I researched and i think i can solve this problem by 2 ways:
Split the large pdf file into many smaller pdf files on the server side, and serve only specific small file on-demand. But this way, i will lost some important metadata like the pdf outlines,...
Using pdf.js direct in server side, get the pdf pages and then serve each page as binary to client side, client side will also use pdf.js (addPage function) to add each page to their viewer. But i don't know it is possible or not.
So what should i do to solve this problem?
Thank you so much.
The best solution is to optimize all your PDF files for web.
The default settings of pdf.js will load only the portion it needs to render.
See here for more info.

open link to a .msg file in outlook

I am enhancing our client database (php 5.6, js) with some filemanagement components.
If one uploads a file it gets displayed in a list with its name and a link with the pathfile to preview it in the browser (PDFs and IMGs get opened nicely) however if someone decides he needs to upload a .msg file the browserpreview of that file is a mess and not readable at all.
Is there a way to automatically open .msg links with outlook of display it properly in the browser?
Take a look at the similar thread - display .msg file in browser using php.
To open an .msg file in Outlook the file should be downloaded and saved on the hard disk, then you need to start a new process specifying the path to the .msg file. I don't think it is possible in PHP. Or you may consider automating Outlook from Internet Explorer (only).
Also you may find third-party components helpful such as MSG .NET or Aspose.

Display the saved file on the webbrowser

I have written a code to capture the packets on the interface using libpcap library and saved in the file i need to display it on the web browser .can any one suggest how to display the saved file on the browser .
Why not use Wireshark instead for your purpose. Why the browser? I dont think your browser can interpret pcap files.
However, there does exist a paid service called CloudShark which basically allows you to upload your pcap files to their server and perform analysis using your browser as the Interface.
More at:
https://appliance.cloudshark.org/

Guacamole VNC File Transfer

I am using Guacamole HTML5 clientless VNC viewer. I am trying to upload a file via Guacamole over VNC. Is this possible?
I looked at the application's homepage and this function seems possible. There is an event called onfile in guacamole.all.js, but there isn't a code sample to replicate this functionality.
How do I upload a file via Guacamole over VNC?
Guacamole uses SFTP to transfer files back and forward to the computer, so it doesn't transfer files over the VNC connection like TightVNC can. This means that you will have to setup an SFTP server on the computer running the VNC-server to be able to transfer files to the computer. If you have done that, you will have to provide the SFTP server details in your connection details page.
Once everything is setup properly you can start uploading and downloading files. For uploading you need to set a "standard uploading directory" in your connection properties. To upload something to that directory simply drag a file and drop it in the view screen in your browser. A little dialog with the upload process will appear and the file will be transferred to the remote computer!
For downloading open the guacamole menu while viewing your remote computer by pressing ctrl+alt+shift. If everything is setup properly you will see a device which you can browse and select the files you want to download. Good luck with this.
P.S. If the VNC-server is running on a windows machine, look at freeFTPd. It's a free lightweight program that can be setup to start at windows startup. Perfect solution for using with guacamole. If you are running linux it shouldn't be too hard to find an sftp server.

Converting ppt to images

I want to convert ppt to images on the client machine and zip all the images and send it to the server.
I've read on many forums and found that it's not possible to convert ppt to images on the server where Office is not installed.
So, I had this thought if the conversion could be done in the client browser and sent to the server, using JQuery or any other client side technology.
Any example would be appreciated.
Thanks
Aspose.Slides for .NET allows you to convert the PPT slides to images on the server, without the need for Microsoft Office installed. You might want to give it a try, if that helps. It is a standard .NET assembly which can be used on the server, in your application. The conversion is simple, here is the sample code:
//Instantiate a Presentation object that represents a PPT file
Presentation pres = new Presentation("demo.ppt");
//Accessing a slide using its slide position
Slide slide = pres.GetSlideByPosition(1);
//Getting the thumbnail image of the slide of a specified size
Image image = slide.GetThumbnail(new Size(290, 230));
//Saving the thumbnail image in jpeg format
image.Save("C:\\thumbnail.jpg", ImageFormat.Jpeg);
Disclosure: I work as developer evangelist at Aspose.
Javascript generally doesn't have the capacity to modify files on the client machine and can't automate a file upload. You may be able to get the desired effect with a Java applet, I'm not sure. The alternative is to provide a stand-alone application that will do the conversion and zipping, then have the user upload the file manually.
Edit: As an afterthought, any reason you can't simply install Office on your server and do it there?
You have no control over the client machine once your html has been rendered and so you cannot achieve this. The user would have to do it manually.

Categories

Resources