Python에서 PDF를 PowerPoint로 변환
Contents
[
Hide
]
Python에서 PDF를 PowerPoint로 변환
Aspose.PDF for Python via .NET은 Python 코드에서 PDF 파일을 PowerPoint PPTX 프레젠테이션으로 변환할 수 있게 해줍니다.
PDF 보고서, 슬라이드 데크, 브로셔 또는 유인물을 PowerPoint 파일로 재활용해야 할 때 이 워크플로를 사용하십시오. 변환 중에 각 PDF 페이지가 PPTX 파일의 개별 슬라이드로 변환됩니다.
PDF를 PPTX로 변환하는 동안 텍스트는 선택 가능한 텍스트로 렌더링되어 PowerPoint에서 업데이트할 수 있습니다. PDF 파일을 PPTX 형식으로 변환하려면 Aspose.PDF가 제공합니다. PptxSaveOptions 클래스. a를 전달하십시오 PptxSaveOptions 두 번째 인수로 객체를 save() 메서드.
Python에서 PDF를 PPTX로 변환
PDF를 PPTX로 변환하려면 다음 코드 단계를 사용하십시오.
단계: Python에서 PDF를 PowerPoint로 변환
- 인스턴스를 생성합니다 문서 클래스.
- 인스턴스를 생성합니다 PptxSaveOptions 클래스.
- 호출 document.save() 메서드.
import aspose.pdf as ap
from os import path
import sys
def convert_PDF_to_PPTX(infile, outfile):
document = ap.Document(infile)
save_options = ap.PptxSaveOptions()
document.save(outfile, save_options)
PDF를 슬라이드 이미지로 PPTX 변환
검색 가능한 PDF를 선택 가능한 텍스트가 아니라 이미지로 PPTX 변환해야 할 경우, Aspose.PDF는 해당 기능을 via 제공한다. PptxSaveOptions 클래스. 이를 달성하려면, 속성을 설정합니다 slides_as_images 의 PptxSaveOptions 다음 코드 샘플에 표시된 대로 클래스를 ’true’로 설정합니다.
import aspose.pdf as ap
from os import path
import sys
def convert_PDF_to_PPTX_slides_as_images(infile, outfile):
document = ap.Document(infile)
save_options = ap.PptxSaveOptions()
save_options.slides_as_images = True
document.save(outfile, save_options)
맞춤 이미지 해상도로 PDF를 PPTX로 변환
이 메서드는 PDF 문서를 PowerPoint (PPTX) 파일로 변환하면서 향상된 품질을 위해 사용자 지정 이미지 해상도(300 DPI)를 설정합니다.
- PDF를 ‘ap.Document’ 객체에 로드합니다.
- ‘PptxSaveOptions’ 인스턴스를 생성합니다.
- ‘image_resolution’ 속성을 300 DPI로 설정하여 고품질 렌더링을 수행합니다.
- 정의된 저장 옵션을 사용하여 PDF를 PPTX 파일로 저장합니다.
import aspose.pdf as ap
from os import path
import sys
def convert_PDF_to_PPTX_image_resolution(infile, outfile):
document = ap.Document(infile)
save_options = ap.PptxSaveOptions()
save_options.image_resolution = 300
document.save(outfile, save_options)
관련 변환
- PDF를 Word로 변환 슬라이드 대신 편집 가능한 문서 출력용.
- PDF를 Excel로 변환 원본 PDF에 표가 많은 비즈니스 데이터가 포함된 경우.
- PDF를 HTML로 변환 브라우저 준비가 된 퍼블리싱 워크플로를 위해.
