hi need to show the xls/doc in the webpage i.e inside the webpage like IFRAME. user will give the path of the documents in the textbox above iframe. I am trying to convert the existing docs/xls into PDF using c# to get the doc from path given by user and need to show in iframe.
can you give me the code or free 3rd party tool to achieve this. kindly help bit urgent.
[email protected]
Loading
Anupam SinghPosted Jun 11, 2014, 5:22 AM
You can download library from sourceforge.net/projects/itextsharp/
Bhabani PrasadPosted Jun 11, 2014, 4:46 AM
Ivan VasilyevPosted Jun 11, 2014, 4:30 AM
You can use with C# code a word automation functions to call the Document.ExportAsFixedFormat method and also with C# code an excel automation to call Workbook.ExportAsFixedFormat method.
If this is not an option for you (these interop libraries are not recommended on server side) then take a look at the following 3rd party tools that have a free version (free version has some file size limitations, but it is fully featured).
This one is a word processing component for C# and here is how you can use it to convert your Word documents into a PDF files in .NET:
string inputFilePath = "Document.doc";
string outputFilePath = "Document.pdf";
DocumentModel.Load(inputFilePath).Save(outputFilePath);
And this one is an excel processing component for C#, also here is how you would achieve the same, conversion of Excel files into a PDF format from C#:
string inputFilePath = "Spreadsheet.xls";
string outputFilePath = "Spreadsheet.pdf";
ExcelFile.Load(inputFilePath).Save(outputFilePath);
jiss jPosted Jul 13, 2010, 5:59 AM