원 주석 추가
Contents
[
Hide
]
원 주석은 PDF 문서의 관심 영역을 강조 표시하는 데 유용합니다.와 함께 PDF 콘텐츠 편집기, 주석 텍스트, 색상, 채우기 옵션, 페이지 번호 및 테두리 너비와 함께 원의 경계를 정의하는 사각형을 지정하여 원형 모양을 만들 수 있습니다.
- PDF 컨텐트 편집기 객체를 만듭니다.
- 입력 PDF를 바인딩합니다.
- 원 경계를 정의합니다.
- 서클 주석을 추가합니다.
- 업데이트된 문서를 저장합니다.
import aspose.pdf as ap
import aspose.pdf.facades as pdf_facades
import aspose.pydrawing as apd
import sys
from os import path
sys.path.append(path.join(path.dirname(__file__), ".."))
from config import set_license, initialize_data_dir
def add_circle_annotation(infile, outfile):
# Create PdfContentEditor object
content_editor = pdf_facades.PdfContentEditor()
# Bind input PDF file
content_editor.bind_pdf(infile)
# Create CircleAnnotation object
rect = apd.Rectangle(300, 300, 400, 400)
contents = "This is circle annotation"
content_editor.create_square_circle(rect, contents, apd.Color.blue, False, 1, 3)
# Save output PDF file
content_editor.save(outfile)