Aspose.pdf for. NET v8.6.0, released yesterday, contains a fairly exciting and exciting feature--that allows you to convert PDF files to MS Excel workbooks. With this new update, the developer can convert the PDF file to the XLS format, and each page in the PDF file is presented as a separate sheet. The following code snippet shows how to use this feature:
123456 |
Load PDF documentAspose.Pdf.Document doc = newAspose.Pdf.Document (@ "c:input.pdf");//Instantiate Excelsave Option ObjectAspose.Pdf.ExcelSaveOptions Excelsave = Newexcelsaveoptions ();//Save the output in XLS Formatdoc. Save ("C:/resultant.xls", Excelsave); |
Previous versions support document conversion PDF file to PS format, to convert PDF document to EPS format, you just need to change printfilename (print file name) as follows:
1 |
Printersettings.printfilename = "Hello.eps"; |
The only difference between getting PS and EPS files is the printer option. Take a look at the "Using LaTeX with EPS figures" Print as EPS section, which defaults to the "HP LaserJet 2300 Series PS" printer and any other PS printer to create PS files. You can change the PostScript output option to Encapsulated PostScript (EPS) to save the EPS file.
In this update, you will also have the ability to save PDF files directly in SVG format. The following code shows a simple line of code that runs this document conversion.
12345678 |
Load PDF documentAspose.Pdf.Document doc = newAspose.Pdf.Document (@ "c:tableresult.pdf"); Aspose.Pdf.SvgSaveOptions saveoptions = NewAspose.Pdf.SvgSaveOptions ();//Do not compress SVG image to Zip archivesaveopt Ions. compressoutputtoziparchive = false;//Output File Namestringoutfilename = @ "C:output.svg";d oc. Save (Outfilename, saveoptions); |
During PDF conversion to HTML, you can also specify a separate folder for the image file.