-1
현재 프로젝트의 특정 div를 클라이언트 측에서 .ppt (pdf 또는 image가 아님)로 변환하는 현재 React 프로젝트의 요구 사항이 있습니다. 이 작업을 직접 수행 할 수 있습니까?특정 HTML 섹션을 파워 포인트 포맷으로 변환하는 방법, 즉 ppt?
현재 프로젝트의 특정 div를 클라이언트 측에서 .ppt (pdf 또는 image가 아님)로 변환하는 현재 React 프로젝트의 요구 사항이 있습니다. 이 작업을 직접 수행 할 수 있습니까?특정 HTML 섹션을 파워 포인트 포맷으로 변환하는 방법, 즉 ppt?
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);
}
@arun은 작동합니까 ?? – TweetMan
클라이언트 측 또는 서버 측? 서버 측이라면'reactjs '와 아무런 관련이 없다. –