내부 필드 복사

동일한 PDF 내의 필드 복사

  1. 소스 PDF를 FormEditor 파사드에 바인딩하세요.
  2. 소스 필드 이름, 새 필드 이름, 페이지 및 좌표를 사용하여 copyInnerField(...)를 호출하세요.
  3. 업데이트된 문서를 저장하세요.
public static void copyInnerField(Path inputFile, Path outputFile) {
    FormEditor editor = new FormEditor();
    try {
        editor.bindPdf(inputFile.toString());
        editor.copyInnerField("First Name", "First Name Copy", 2, 200, 600);
        editor.save(outputFile.toString());
    } finally {
        editor.close();
    }
}