C++에서 PDF 또는 HTML 프레젠테이션 가져오기
Contents
[
Hide
]
소개
Using Aspose.Slides for C++, you can import presentations from files in other formats. Aspose.Slides provides the SlideCollection class to allow you to import presentations from PDF, HTML documents, etc.
PDF에서 PowerPoint 가져오기
In this case, you get to convert a PDF to a PowerPoint presentation.

- 프레젠테이션 클래스의 객체를 인스턴스화합니다.
- PDF 파일을 전달하여 AddFromPdf() 메서드를 호출합니다.
- PowerPoint 형식으로 파일을 저장하기 위해 Save() 메서드를 사용합니다.
다음 C++ 코드는 PDF를 PowerPoint로 변환하는 작업을 보여줍니다:
auto pres = System::MakeObject<Presentation>();
pres->get_Slides()->AddFromPdf(u"InputPDF.pdf");
pres->Save(u"OutputPresentation.pptx", SaveFormat::Pptx);
Tip
Aspose 무료 PDF to PowerPoint 웹 앱을 확인해 보세요. 이 앱은 여기서 설명한 프로세스의 실시간 구현이기 때문입니다.HTML에서 PowerPoint 가져오기
In this case, you get to convert a HTML document to a PowerPoint presentation.
- Presentation 클래스의 인스턴스를 생성합니다.
- HTML 파일을 전달하여 AddFromHtml() 메서드를 호출합니다.
- PowerPoint 형식으로 파일을 저장하기 위해 Save() 메서드를 사용합니다.
다음 C++ 코드는 HTML을 PowerPoint로 변환하는 작업을 보여줍니다:
auto presentation = System::MakeObject<Presentation>();
{
auto htmlStream = System::IO::File::OpenRead(u"page.html");
presentation->get_Slides()->AddFromHtml(htmlStream);
}
presentation->Save(u"MyPresentation.pptx", SaveFormat::Pptx);
Note
Aspose.Slides를 사용하여 HTML을 다른 일반 파일 형식으로도 변환할 수 있습니다:
FAQ
PDF를 가져올 때 표가 보존되며, 표 감지를 개선할 수 있나요?
표는 가져오는 동안 감지될 수 있습니다. PdfImportOptions에는 표 인식을 활성화하는 set_DetectTables 메서드가 포함되어 있습니다. 효과는 PDF의 구조에 따라 달라집니다.