.net component for previewing office documents - asp.net

I have a CMS system written in ASP.NET which among other things allows users to upload documents, typically PDF, powerpoint, Word etc.
I am investigating how to implement a preview function so that once the document has been uploaded it would generate a thumbnail of the first page in the document.
Does someone have an idea what libraries, controls are available to achieve this?

I ended up using Adeptol AJAX DocumentViewer. Very easy to implement and works with over 300 formats.

Related

Can I control the handling of word files by the user in asp.net?

Today we have a classic asp application to manipulate the word files in the company. By using ActiveX, we can download, edit, print and finally upload the modifications without much interation.
Explaining: If I need to update anything in the "Processes.doc" file, I click on it, the ActiveX download the file to my desktop, I use it whenever I want but, when I close the file, the ActiveX uploads the new version, if this need applies with the rules.
This feature only works under IE and the users have this desire to do the same in other browsers. And the boss wants this system updated in asp.net.
My question is only "how is this possible?" How can I make it cross-plataform with the same usability that I have now? I spent the day reading about custom controls in asp.net (using object tag, but it don't work in FF), third-party components (expensive and I don't know if it will work), ActiveX written in .NET.
Any other suggestions? There is another way to this?
ActiveX is being phased out as is Flash and being replaced by JS/HTML5. These two client side technologies are more than capable of editing word documents but in the end I think you'll find that getting away from a proprietary format like MS word is the way to go. HTML is powerful enough to provide most of the same features of MS word so once the files have been converted it's simply a matter of finding a javascript HTML document editor. From there you simply need to rework the mechanism which downloads and uploads the HTML to the server to use AJAX and you'll be good to go.
Here are some examples of HTML editors:
http://www.tinymce.com/
http://speckedit.com/demo
http://nicedit.com/demos.php
http://ckeditor.com/demo

Building a bespoke PDF brochure via web form or CMS

I'd like to set up a CMS that allows clients to generate a PDF brochure from a series of text inputs and text areas (rich text editor). Clients would fill out text inputs and then select (via a check box) which contents should appear in the exported PDF. This would then stitch together a PDF brochure containing pages only applicable to the options chosen by the client.
All the content is in a CMS with web pages and pdfs built on the fly as per the client's choices. A change in the content is then reflected immediately in the published docs meaning no redundant, out of date pdfs and the benefit of all the tools within the CMS (workflow, publishing dates, security, etc).
Does anyone know of any tools that do this?
Appreciate any help.
well your question require a lot of work to be done. I had similar requirement and what i have done i can brief here. I created multiple views which lets me select their columns and i have used my own rules for differentiating columns from test like {view.columnname}. when your save all information i have used itextsharp for pdf generation.
There is plenty of information on itextsharp.
You might be able to do this with design tools and reporting software, plugged into your CMS of choice. For example, you could use Wordpress, and then design your PDF output using iReport, and run it with Jasper. You'd have to work on the bit to translate user inputs to a query passed to the report, but that shouldn't be too much work.
One issue is that, regardless of the work you put into the design, when you attempt to share it, it wont look like a brochure at all, only sequential single page PDFs. As an alternative I found a website where you can upload or design your brochure, it can then be downloaded and shared as a flippable, digital brochure. If you are interested check out https://simplebooklet.com/learn/animated-tri-folds.php

Editing word documents in a web page

I realise this question has been asked many times before but a lot of them are old now without an answer.
I have a need for users to be able to edit word documents from my web page.
Are there any editors, or components, that will allow me to do this?
A bit of background, the user will be able to upload a word document to my site and then view/edit it from there. There will be no requirement for the user to download the document again but ideally I'd like to keep the document as a word doc at my end.
Cheers
A little pricey, but the .NET Server version of TX Text Control allows editing of .doc and .docx documents within a browser. (I have the standalone .NET Pro version.)
Here's a much cheaper one: Cute Editor, but I have never used it.
Well, you can do what you want with the OpenXML SDK and some XSLT (you can convert to/from docx or WordML to html) but it's not easy, and you'd have a great deal of difficulty retaining fidelity if you have much more than very simple documents.

ASP.NET website, server-side DOCX to PDF conversion

I've been having a heckuva time with this problem, and there seems to be a lot of noise out there in search engines in getting to the bottom of it, so forgive me if I've missed a silver bullet out there.
The base need is that I have to generate a PDF document that has both static and dynamic elements. I started to do this by having a PDF template with all the static content, and then I wanted to inject various dynamic elements into it. The problem is that PDFs are not meant to be manipulated that way, and depending on the size of the dynamic text I put in there, might overflow text on other pages. I was using iTextSharp but can't get past this problem.
A possible fallback is to generate a DOCX, which I've done before, and then convert it into a PDF on the backend. The only libraries I've found to do this are paid apps (like Aspose). There are examples out there that convert to PDF without these libraries, but they seem to require a client-side application. I'm doing this via IIS.
To make a long story longer...are there free libraries that will convert a DOCX file to a PDF server-side without launching client applications to do so?
There are a few choices here:
build a COM interop class that will perform read and 'Save As' functions on your .docx. The MSDN link you gave doesn't require to be run client-side, but rather have the Office assemblies in the GAC or in your ASP.NET's bin directory.
buy a third party component to do the work for you. Here's just one example with no guarantees.
I'm not familiar with any good free ones, but we used Aspose.Words to achieve something similar to what you describe. We keep Word templates with static text and mail-merge fields. The templates can be regular Word documents, they don't have to be .dot templates. Mail-merge fields can be either single fields or repeatable data in tables so you can easily generate pretty complex documents without doing dynamic document editing. (Which is always an option)
Using Aspose for this was so friction free that I would suggest using Aspose unless the cost (which is significant) is a show-stopper. The support is also good which is always an added bonus.
There are always some caveats...
I would have liked more control over the PDF compatability of the generated PDFs. We had some issues with older clients reading the generated PDFs.
Mail-merge is not fun. Complex mail-merge expressions was time consuming to get right.
I just found very simple solution to convert any files from command-line using LibreOffice:
soffice.exe --headless --convert-to pdf file.xls
(google for the rest)

Creating interactive reports in PDF

I want to create reports that can be drilled down by the readers - but the reports have to be PDF. I have two options:
Link from the PDF to an online report tool
Make the reports themselves interactive
I like #2...
I believe I can do this with Adobe AIR (Flex, Flash + Adobe Reader 9 or higher).
There are tools that can create PDF documents programatically (AIR?, AlivePDF)
There are frameworks in Adboe that are ideal for reports and charts (Flex)
And PDF documents can contain flash content (Adobe Reader 9+)
My questions are:
If I have an interactive Flash component in a PDF document and I go to print, what will print? Will the current view of he Flash print?
If I want to drill down, all the data has to be in the PDF document (it has to be stand alone). This is fine... but how to do I put the data in the PDF programatically? Is this done with Flex and AlivePDF?
I saw an online sample of an interactive charting report in a PDF document, but now I can't find it. :( I would love to find something again if you know of one.
I feel that I may have all the pieces, but not understanding correctly how they all go together. Any ideas?
Answer to question 3: Currently AlivePDF does not allow you to embed Flash content into a generated PDF. The generated PDFs can include text, images, simple graphics, and certain non-visual features such as bookmarks.
PDF's have JavaScript as a native control language now. With it, you can embed "links" that jump to other pages, etc.
Theoretically, you can call web services from within a PDF using JS and process the responses, perhaps even dynamically filling page areas.
BUT
PDF's are good for providing a document that looks and prints the same everywhere. They are also good for fill-in forms. They are NOT built for "drill-down" on the client side. Can you check the goals of the project to see why they want dynamic PDF's ? If they want portability (i.e. without a web connection), perhaps you can give them what they want with an AIR application and an XML file.
Cheers
we developed interactive content reports for PDF/flashpaper/etc using flex as a front-end but handle the actual report creation server-side using coldfusion's cfdocument/cfpdf (or Itext if we really need insane levels of placement/control/etc.). basically the user chooses the content & the cf app on the backend lays it out & sends back the report.

Resources