멀티미디어
Contents
[
Hide
]
현재 Java PdfContentEditorExamples 클래스는 addMovieAnnotation(...)을 직접 지원합니다.
영화 주석 추가
- 소스 PDF를
PdfContentEditor파사드에 바인딩하세요. - 주석 사각형, 동영상 파일 경로 및 페이지 번호를 사용하여
createMovie(...)를 호출하세요. - 업데이트된 PDF 문서를 저장하세요.
public static void addMovieAnnotation(Path inputFile, Path movieFile, Path outputFile) {
PdfContentEditor editor = new PdfContentEditor();
try {
editor.bindPdf(inputFile.toString());
editor.createMovie(new Rectangle(80, 500, 220, 120), movieFile.toString(), 1);
editor.save(outputFile.toString());
} finally {
editor.close();
}
}