동영상 주석 추가
Contents
[
Hide
]
PDF의 동영상 주석을 사용하면 비디오와 같은 멀티미디어 콘텐츠를 문서에 포함할 수 있습니다.사용 PDF 콘텐츠 편집기, 비디오가 표시될 페이지에 사각형을 정의할 수 있습니다.클릭하면 PDF에서 직접 비디오를 재생할 수 있으므로 문서를 더욱 인터랙티브하고 매력적으로 만들 수 있습니다.
- PDF 컨텐트 편집기 인스턴스를 만듭니다.
- 입력 PDF 문서를 바인딩합니다.
- 동영상 주석의 사각형을 정의합니다.
- 삽입할 비디오 파일을 지정합니다.
- 주석의 페이지 번호를 지정합니다.
- 업데이트된 PDF 문서를 저장합니다.
import aspose.pdf.facades as pdf_facades
import aspose.pydrawing as apd
import sys
from os import path
sys.path.append(path.join(path.dirname(__file__), ".."))
from config import set_license, initialize_data_dir
def add_movie_annotation(infile, movie_file, outfile):
# Create PdfContentEditor object
content_editor = pdf_facades.PdfContentEditor()
# Bind document to PdfContentEditor
content_editor.bind_pdf(infile)
# Add movie annotation to page 1
content_editor.create_movie(apd.Rectangle(80, 500, 220, 120), movie_file, 1)
# Save updated document
content_editor.save(outfile)