기존 PDF 파일의 모든 필드 평탄화하기 (facades)
Contents
[
Hide
]
Form 클래스의 flattenAllFields(..) 메서드는 PDF 양식의 모든 필드를 평탄화할 수 있게 해줍니다. 먼저 Form 객체를 생성하고, 원본 PDF 파일을 바인딩한 다음 flattenAllFields(…) 메서드를 호출하고 마지막으로 save(..) 메서드를 사용하여 업데이트된 PDF를 저장해야 합니다.
다음 코드 조각은 PDF 파일의 모든 필드를 평탄화하는 방법을 보여줍니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-pdf/Aspose.Pdf-for-Java | |
// open document | |
Form pdfForm = new Form(); | |
// bind source PDF file | |
pdfForm.bindPdf("input.pdf"); | |
// flatten fields | |
pdfForm.flattenAllFields(); | |
// save output | |
pdfForm.save("output.pdf"); |