2017-05-15 1 views

답변

1

finalOutputDoc.Save (@ "C : \ temp \ temp.html", Aspose.Pdf.SaveFormat.Html);

 //Next convert to powerpoint 
     //Create Empty presentation instance//Create Empty presentation instance 
     //using (Aspose.Slides.Presentation pres = new Aspose.Slides.Presentation()) 
     //Create Empty presentation instance//Create Empty presentation instance 
     //Create Empty presentation instance//Create Empty presentation instance 
     using (Presentation pres = new Presentation()) 
     { 
      //Acesss the default first slide of presentation 

      ISlide slide = pres.Slides[0]; 

      //Adding the AutoShape to accomodate the HTML content 
      IAutoShape ashape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 10, 10, pres.SlideSize.Size.Width - 20, pres.SlideSize.Size.Height - 10); 

      ashape.FillFormat.FillType = FillType.NoFill; 

      //Adding text frame to the shape 
      ashape.AddTextFrame(""); 

      //Clearing all paragraphs in added text frame 
      ashape.TextFrame.Paragraphs.Clear(); 

      //Loading the HTML file using stream reader 
      TextReader tr = new StreamReader(@"C:\temp\temp.html"); 

      //Adding text from HTML stream reader in text frame 
      ashape.TextFrame.Paragraphs.AddFromHtml(tr.ReadToEnd()); 

      //Saving Presentation 
      pres.Save(@"C:\temp\output.pptx", Aspose.Slides.Export.SaveFormat.Pptx); 

     } 
+0

@arun은 작동합니까 ?? – TweetMan

관련 문제