Hi,
I have a requirement that user can upload files like .DOC, .PPT, .XLS and .VSD in my application.
I need to read the uploaded files and then add page by page to PDF. How can we do this?
Thanks,
Hi,
Hi Karthik,
Hi,
Hi Karthik,
//Instantiate a Presentation from where the slide will be clonedPresentation pres1 = new Presentation(“source.ppt”);Presentation pres2 ;//Creating SortedList object that is used to store the temporary information//about the masters of PPT file. No value should be added to it.SortedList sList = new SortedList();for(int i=1;i<=pres.Slides.LastSlidePosition;i++){//Instantiate a Presentation where the cloned slide will be addedpres2 = new Presentation();//Accessing a slide using its slide positionSlide slide = pres1.GetSlideByPosition(i);//Cloning the selected slide at the end of another presentation filepres1.CloneSlide(slide, pres2.Slides.LastSlidePosition + 1, pres2, sList);//Removing defpres2.Slides.Remove(pres1.GetSlideByPosition(1));//Saving PDFpres2.Write(“C:\Slide_”+i+".pdf",SaveFormat.Pdf);}
Thanks Imran Rafique, Amjad Sahi, Mudassir Fayyaz. Your answers useful. But what are the other kind of documents that aspose supports to convert into PDF? like the *.MSG, *.HTML, *.MHT, .XML,.PSD etc…
You can convert Doc, Docx, Rtf, Html etc files to Pdf file format by using Aspose.Words. You can load file formats mentioned in the following article into Aspose.Words DOM.
Once you have loaded a file of LoadFormat into Aspose.Words DOM, you can easily render it to Pdf. We suggest you please read the following article for more detail.