I am looking for easy solution to convert documents from one format(doc, html, xls...) to pdf in ASP.NET.
Is the iTextSharp a good choise? Can iTextSharp convert documents from one format to pdf?
What library can your suggest me to use?
I've been using winnovative for all my PDF generation for the past few years:
http://www.winnovative-software.com/
Fair few good features, and simple to implement, if you don't mind paying for a license.
The default standard for this task should be Microsoft Office SharePoint Server. Another option would be using Microsoft Office applications from ASP.NET with Automation, combined with a PDF Printer (you will need a copy of Microsoft Office installed on the server). There are many PDF printers outthere (Cute PDF for example), but if you can afford a commercial option I recommend Amyuni PDF Converter. There are samples of Word/Excel to PDF conversion using Office+Automation with this product.
I'm working as Developer Evangelist with Aspose. And I would like to share with you that you may try Aspose.Total for .NET product suite, which allows you to convert various file formats (DOC/DOCX/PPT/PPTX/XSL/HTML etc.) into PDF format. You may also select components of your choice. Complete samples, tutorials and support are also available for these components.
Please note that these components are standard .NET assemblies and you can use them either in ASP.NET or Windows Forms applications.
Give the Muhimbi PDF Converter Services a look. It installs in your environment as a scalable and robust Windows Service and has specifically been designed for use from server based applications such as ASP.NET.
It comes with a friendly web services based interface that allows it to be used from most modern environments such as Java and .NET. It supports all common as well as some not so common file formats. Watermarking and PDF Security is included as well. If you have SharePoint in your environment then a SharePoint optimised version is available as well.
Disclaimer, I have worked on this product so the usual disclaimers apply. Having said that, it works great.
Related
In My ASP.NET Website, I am taking data inputs and storing it in Database. Now, I need to put a functionality where I can get the stored data in Export to PDF facility where i can save the pdf, having the data in specific format. Can anyone guide in this regard ?
you will need to use a 3rd party framework to do this. Most reporting tools have an option to export a report to PDF. I believe SSRS has this option, I know Crystal Reports has this functionality. I'm sure other reporting tools have this feature too.
There are also tools for directly generating PDFs instead of going through a report. A quick google search of .net pdf generator will be a good starting point. There is also iText which is an open source project for generating PDFs from xml. There is not much documentation on iText sharp and it's not actively developed from my understanding so expect a huge learning curve with this library.
unless the reporting features built into the .net framework (reporting services) can generate a PDF that meets your needs expect to purchase a 3rd party tool to help you create the PDF.
Does there exist a fast and light reporting system for projects in Visual Studio for projects in asp .net mvc? Crystal reports is too big and "heavy" and not a good choice for 200+ users who create a PDF report at once.
Thanks for your tips.
I like FastReport. But I just know the Delphi-Version and can't say how mature the .Net-Version is.
The Delphi-version is lightweight, easy to use but with it's scripting-possibilities very powerful.
So I think even the .Net-version should be worth a look.
Take a look into List Label (from combit), too! It has a different approach, a very good designer and direct vendor support. Distribution files are "lightweight" compared to other solutions.
Reporting services is free if you have an sql server license and if you run the reporting services server on the same db server. I consider it pretty lightweight and easy to use.
Try the ItextSharp or the nuget package
We used it's and it was fine!
DevXpress XtraReports allows you to design reports with a good designer then you use them as normal C# classes. I like it very much, you can create reports and export them to pdf file or stream on the server even with no UI at all then you can download the pdf from mvc or store it somewhere. I use it as much as I can.
There is a blog which details about using Active Reports to create reports in a MVC application. You can go through the blog here.
Active Reports is a very flexible and easy to use reporting tool,it is supported on Win Forms, Asp.net, SilverLight and supports data sources like Sql Server, My Sql, XML, Oledb etc.
I need to generate reports from database (billing forms for example) from ASP.NET interface. So I'm wondering which approach is better : Use Crystal Reports, reports based on RDLC or SQL Reporting Services ? I need to create an interface, which allows user to select data and through pre-created report definition generate that report. I want to use ASP.NET with AJAX, so it will act as a real application, but with no need for installation - and this is primary requirement.
So, if somebody knows which technology suits best those requirements...I will be grateful :)
Personally I would go for DevExpress XtraReports.
I have used it in the past in both windows forms and web forms; it costs few hundreds of bucks but with the package you also get plenty of other UI controls, or you spend less and only buy XtraReports. It pays off in a flash, main advantages in my opinion are:
each report can be designed with a Visual Studio integrated designer and becomes a simple c# class, easy to instantiate and use, no magic and no external report definitions, all pure 100% .NET code;
end user designed is royalty free and users are amazed by the power and quality of the designer, with Ribbon or classic UI, plenty of features;
so many out of the box zero coding ready to use features like print preview, export to excel, pdf etc...
Disclaimer: I do not work for DevExpress, I am not paid by them, simply I am a satisfied customer and used their products before with joy and good results, we are now in the process of starting a major MVC application development in my company and we are buying licenses of their DXperience Enterprise subscription these days.
you are free to also evaluate or test Crystal Reports or similar reporting solutions offered by ActiveReports, Telerik etc, I can only speak about XtraReports because I used it a lot, Crystal I used in the past with Visual Studio 2003 but I was not so impressed by the designer and deployment was really a mess in windows forms... always missing some files and having errors on client machines...
I would suggest taking a look at ActiveReports 6. It provides great features and allows you to make almost unlimited customization to your report. For ASP.NET you can either opt for the standard edition which allows you to custom export your reports to different formats like PDF, Excel etc and display them to the users.
The professional edition provides you a webviewer control which allows you to display reports directly on the viewer and the user has the option to chose from PDF, HTML and FlashViewer format. In addition to this it also provides a silverlight based viewer control.
You may also want to check the blogs and the forums just in case you want to get more information about the product.
Thanks,
Sankalp (GrapeCity)
Don't miss to take a look into List & Label, too.
We've done some good projects with it!
We use SQL Server Reporting services, it has a visual studio based designer, and it's free. The distribution is a little tricky - If your clients already have SQL Server installed, then there is a a good chance they will have the reporting framework installed. Otherwise you can get just about distribute the dll's with your application - although this takes a bit of digging.
My clients are trying to revive an ASP.NET 1.0 application (yes, you read that right) that generated data-driven Visio Gantt diagrams. I have access to the code (VB.NET), but there are no notes, comments, or documentation, and no employees from 2003 still around. Compounding the issue, I'm pretty new on the scene (ASP.NET 3.5+ only), so the project structure looks very foreign to me (.resx files?).
I've tried including Visio Interop libs with little success. I tried following this article , but when adding the MS Visio 12.0 type library reference to the project solution in VWD Express 2010, I get an error that reads, "A reference to "Microsoft Visio Viewer 12.0 Type Library" could not be added. Converting the type library to a .NET assembly failed. No process is associated with this object." I don't know what that means but I sense it'll be a huge headache to resolve.
At this point I'm stuck and considering porting this feature to more a current platform. Can anybody suggest anything?
Visio has an xml format (.vdx)
If you don't need Visio to help you with layout or connections, you might be able generate the xml files, then have your ASP app serve them up as consumable Visio files.
If you need Visio's Gantt-chart add-in features, or Visio's export to web or image features, then this might not be the way to go. But if you only need to place shapes on a page, set text and other data fields, and have a fairly simple layout and simple connecting lines, you should be able to go this route.
The last download link in this article is for a presentation on Visio and XML that I gave a while back:
http://www.visguy.com/2006/11/30/visio-and-xml-conference-resources/
You should not access the automation API of any Office program from ASP.NET or any other server environment. It is unsupported, will fail at random, and may cause you to violate the terms of your license with Microsoft.
Tell them "no". You'll be much happier.
Well, you may download and use Aspose.Diagram library. It works with Microsoft Visio files without the installation of Microsoft Office Visio. Developers can create, open and manipulate the elements of diagrams and export to many other supported file formats. Based on your scenario, you may get details from a database backend and then create Visio diagrams. It is achievable using Aspose.Diagram API. Please refer to the technical resources of Aspose.Diagram for .NET API.
I work as a Developer Evangelist at Aspose.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Similar questions have been asked, but nothing exactly like mine, so here goes.
We have a collection of Microsoft Word documents on an ASP.NET web server with merge fields whose values are filled in as a result of user form submissions. After the field merge, the server must convert the document to PDF and stream it down to the browser. Our first inclination was to use the Visual Studio Tools for Office API; however, we ran into this warning from Microsoft:
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
It looks like the field manipulation can be done using the Open XML SDK, but what's the best way to convert Word 2007 documents to PDF without opening Word? The optimal solution would be low-cost, scalable, have a low memory footprint, be easy to deploy, and have a .NET API.
It's not exactly Open Source, but Aspose has a couple products which can do that,
Aspose.Pdf.Kit
Aspose.Pdf.Kit is a non-graphical PDF® document manipulation component that enables both .NET and Java developers to manage existing PDF files as well as manage form fields embedded within PDF files. Aspose.Pdf is perfect for creating new PDF files; however, developers often need to edit already existing PDF documents. Aspose.Pdf.Kit allows them to do just that. Aspose.Pdf.Kit allows developers to create powerful applications for merging data directly into PDF documents as well as for updating and managing PDF documents. Aspose.Pdf.Kit is a wonderful product and works great with the rest of our PDF products.
and Aspose.pdf
Aspose.Pdf is a non-graphical PDF® document reporting component that enables either .NET or Java applications to create PDF documents from scratch without utilizing Adobe Acrobat®. Aspose.Pdf is very affordably priced and offers a wealth of strong features including: compression, tables, graphs, images, hyperlinks, security and custom fonts. Aspose.Pdf supports the creation of PDF files through API, XML templates and XSL-FO files. Aspose.Pdf is very easy to use and is provided with 14 fully featured demos written in both C# and Visual Basic.
Check out the API and demos. You can download a DLL for free to try it out. I've used both before and they work out great.
There's also iTextSharp which is a C# port of iText, a Java PDF converter. I've heard some people try it with mixed results.
The question is "MS Word Documents to PDF in ASP.NET" so I am very puzzled why Aspose.Pdf and Aspose.Pdf.Kit are recommended above. You need to use Aspose.Words because that's the component that supports Microsoft Word documents to PDF conversion.
Check out Microsoft's resource on Saving Word 2007 Documents to PDF and XPS Formats using C# or VB.
ActivePdf DocConverter - http://www.activepdf.com/
But it requires Office installed on the server for good quality conversion.
Aspose.Words may be the best option for you, but it doesn't convert all visual elements perfectly.
Have a look at the Muhimbi PDF Converter Web Services. It runs on Windows as a service, but can be accessed from any non-Windows web services capable environment including Java and .NET.
Although this solutions requires MS-Office to be installed on a server (not necessarily the same server as your application), it is very robust and provides perfect conversion fidelity. It goes to great lengths to get around the deadlock problems Microsoft refer to in their KB article.
To generate or Modify MS-Word files I recommend using the free Open XML SDK for Microsoft Office. Eric White maintains a really good Blog about it.
Disclaimer, I worked on this product. Having said that, it works great.
You should try using OpenOffice for this. It is Free and supports a whole range of file conversions. I have used it to convert DOC & DOCX files to HTML format with fantastic results.
ABCpdf is another popular component that'll let you convert Word documents to PDF under ASP.NET, however I believe it too makes use of Microsoft Office or OpenOffice.
http://www.websupergoo.com/abcpdf-office-docs.htm
Microsoft PDF add-in for word seems to be the best solution for now but you should take into consideration that it does not convert all word documents correctly to pdf and in some cases you will see huge difference between the word and the output pdf. Unfortunately I couldn't find any api that would convert all word documents correctly. The only solution I found to ensure the conversion was 100% correct was by converting the documents through a printer driver. The downside is that documents are queued and converted one by one, but you can be sure the resulted pdf is exactly like the word docuemtn. I personally preferred using UDC (Universal document converter) and installed Foxit Reader(free version) on server too then printed the documents by starting a "Process" and setting its Verb property to "print". You can also use FileSystemWatcher to set a signal when the conversion has completed.