PDF에 페이지 추가

PDF에 페이지 추가

Java 샘플은 두 번째 PDF의 1페이지를 첫 번째 문서의 끝에 추가합니다.

단계

  1. PdfFileEditor 인스턴스를 생성하세요.
  2. 해당 경로를 append에 전달하여 기본 입력 PDF를 바인딩하세요.
  3. 추가할 보조 소스 파일 목록과 페이지 범위를 제공하세요.
  4. 병합된 결과를 출력 파일에 저장하세요.

Java 예제```java

public static void appendPagesToPdf(Path inputFile, Path sampleFile, Path outputFile) { PdfFileEditor pdfEditor = new PdfFileEditor(); pdfEditor.append(inputFile.toString(), new String[] {sampleFile.toString()}, 1, 1, outputFile.toString()); }