GroupDocs.Annotation for Java은(는) PDF 문서에 주석 달기를 쉽게 합니다:
- Annotator 인스턴스로 PDF를 엽니다.
- 필요한 주석을 만들고 구성합니다.
- 문서에 주석을 추가합니다.
- 주석이 달린 PDF를 저장합니다.
GroupDocs.Annotation for Java은(는) PDF 문서에 주석 달기를 쉽게 합니다:
// PDF 문서에 주석 달기
// Annotator 인스턴스로 PDF를 엽니다
Annotator annotator = new Annotator("input.pdf");
try {
// 영역 주석 만들기
AreaAnnotation area = new AreaAnnotation();
area.setBox(new Rectangle(100, 100, 200, 80));
area.setBackgroundColor(65535);
area.setPageNumber(0);
area.setMessage("Important");
// 주석 추가
annotator.add(area);
// 주석이 달린 PDF 저장
annotator.save("annotated.pdf");
} finally {
annotator.dispose();
}
모든 주석 유형을 PDF 문서에 추가하고 간단한 API로 관리합니다.

PDF 파일에서 텍스트를 강조, 밑줄, 취소선, 또는 교체합니다.
PDF 페이지에 도형을 그리고 워터마크 또는 이미지를 스탬프합니다.
PDF 주석을 가져오고, 제거하고, 가져오며, 내보냅니다.
// 주석이 달린 PDF 열기
Annotator annotator = new Annotator("annotated.pdf");
try {
// 모든 주석 가져오기
List<AnnotationBase> annotations = annotator.get();
// 각 주석 검사하기
for (AnnotationBase annotation : annotations) {
System.out.println(annotation.getMessage());
}
// 문서 저장
annotator.save("output.pdf");
} finally {
annotator.dispose();
}
GroupDocs.Annotation for Java은(는) 다양한 파일 형식의 문서에 주석을 달는 것을 지원합니다: