Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
이 문서에서는 C#을 사용하여 PDF를 PowerPoint로 변환하는 방법을 설명합니다. 다음 주제를 다룹니다.
형식: PPTX
형식: PowerPoint
다음 코드 스니펫은 Aspose.PDF.Drawing 라이브러리와 함께 작동합니다.
Aspose.PDF for .NET는 PDF를 PPTX로 변환하는 진행 상황을 추적할 수 있게 해줍니다.
우리는 PPT/PPTX 프레젠테이션을 생성하고 조작할 수 있는 기능을 제공하는 Aspose.Slides라는 API를 가지고 있습니다. 이 API는 PPT/PPTX 파일을 PDF 형식으로 변환하는 기능도 제공합니다. 최근에 많은 고객으로부터 PDF를 PPTX 형식으로 변환하는 기능을 지원해 달라는 요청을 받았습니다. Aspose.PDF for .NET 10.3.0 버전부터 PDF 문서를 PPTX 형식으로 변환하는 기능을 도입했습니다. 이 변환 과정에서 PDF 파일의 개별 페이지가 PPTX 파일의 별도 슬라이드로 변환됩니다.
PDF를 PPTX로 변환하는 동안 텍스트는 선택 및 업데이트할 수 있는 텍스트로 렌더링됩니다. PDF 파일을 PPTX 형식으로 변환하기 위해 Aspose.PDF는 PptxSaveOptions
라는 클래스를 제공합니다. PptxSaveOptions 클래스의 객체는 Document.Save(..) method
메서드의 두 번째 인수로 전달됩니다. 다음 코드 스니펫은 PDF 파일을 PPTX 형식으로 변환하는 과정을 보여줍니다.
PDF를 PPTX로 변환하기 위해 Aspose.PDF for .NET는 다음 코드 단계를 사용할 것을 권장합니다.
단계: C#에서 PDF를 PowerPoint로 변환하기 | 단계: C#에서 PDF를 PPTX로 변환하기
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void ConvertPDFToPPTX()
{
// The path to the documents directory
var dataDir = RunExamples.GetDataDir_AsposePdf();
// Open PDF document
using (var document = new Aspose.Pdf.Document(dataDir + "input.pdf"))
{
// Instantiate PptxSaveOptions object
var saveOptions = new Aspose.Pdf.PptxSaveOptions();
// Save the file in PPTX format
document.Save(dataDir + "PDFToPPT_out.pptx", saveOptions);
}
}
온라인에서 PDF를 PowerPoint로 변환해 보세요
Aspose.PDF for .NET는 “PDF to PPTX”라는 온라인 무료 애플리케이션을 제공하여 기능과 품질을 조사해 볼 수 있습니다.
검색 가능한 PDF를 선택 가능한 텍스트 대신 이미지로 PPTX로 변환해야 하는 경우, Aspose.PDF는 Aspose.Pdf.PptxSaveOptions 클래스를 통해 이러한 기능을 제공합니다. 이를 달성하기 위해 PptxSaveOptions 클래스의 SlidesAsImages 속성을 ’true’로 설정합니다. 다음 코드 샘플에서 보여줍니다.
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void ConvertPDFToPPTWithSlidesAsImages()
{
// The path to the documents directory
var dataDir = RunExamples.GetDataDir_AsposePdf();
// Open PDF document
using (var document = new Aspose.Pdf.Document(dataDir + "input.pdf"))
{
// Instantiate PptxSaveOptions object
var saveOptions = new Aspose.Pdf.PptxSaveOptions
{
SlidesAsImages = true
};
// Save the file in PPTX format with slides as images
document.Save(dataDir + "PDFToPPT_out.pptx", saveOptions);
}
}
Aspose.PDF for .NET는 PDF를 PPTX로 변환하는 진행 상황을 추적할 수 있게 해줍니다. Aspose.Pdf.PptxSaveOptions 클래스는 변환 진행 상황을 추적하기 위해 사용자 정의 메서드에 지정할 수 있는 CustomProgressHandler 속성을 제공합니다. 다음 코드 샘플에서 보여줍니다.
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void ConvertPDFToPPTWithCustomProgressHandler()
{
// The path to the documents directory
var dataDir = RunExamples.GetDataDir_AsposePdf();
// Open PDF document
using (var document = new Aspose.Pdf.Document(dataDir + "input.pdf"))
{
// Instantiate PptxSaveOptions object
var saveOptions = new Aspose.Pdf.PptxSaveOptions();
// Specify custom progress handler
saveOptions.CustomProgressHandler = ShowProgressOnConsole;
// Save the file in PPTX format with progress tracking
document.Save(dataDir + "PDFToPPTWithProgressTracking_out.pptx", saveOptions);
}
}
// Define the method to handle progress events and display them on the console
private static void ShowProgressOnConsole(Aspose.Pdf.UnifiedSaveOptions.ProgressEventHandlerInfo eventInfo)
{
switch (eventInfo.EventType)
{
case Aspose.Pdf.ProgressEventType.TotalProgress:
// Display overall progress of the conversion
Console.WriteLine($"{DateTime.Now.TimeOfDay} - Conversion progress: {eventInfo.Value}%.");
break;
case Aspose.Pdf.ProgressEventType.ResultPageCreated:
// Display progress of the page layout creation
Console.WriteLine($"{DateTime.Now.TimeOfDay} - Result page {eventInfo.Value} of {eventInfo.MaxValue} layout created.");
break;
case Aspose.Pdf.ProgressEventType.ResultPageSaved:
// Display progress of the page being exported
Console.WriteLine($"{DateTime.Now.TimeOfDay} - Result page {eventInfo.Value} of {eventInfo.MaxValue} exported.");
break;
case Aspose.Pdf.ProgressEventType.SourcePageAnalysed:
// Display progress of the source page analysis
Console.WriteLine($"{DateTime.Now.TimeOfDay} - Source page {eventInfo.Value} of {eventInfo.MaxValue} analyzed.");
break;
default:
break;
}
}
이 문서에서는 다음 주제도 다룹니다. 코드 내용은 위와 동일합니다.
형식: PowerPoint
형식: PPTX
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.