Text

텍스트 API

Aspose.PDF FOSS for Java provides text handling through multiple APIs depending on the use case.

FormattedText

FormattedText 표지판 및 주석에 쓰기 위한 스타일링 텍스트를 나타냅니다. 글꼴, 크기와 색상 특성을 포함해서 문자열을 캡슐화합니다.

텍스트 대체

PdfContentEditor.replaceText() PDF 콘텐츠 스트림 내에서 텍스트 문자열을 대체합니다:

try (PdfContentEditor editor = new PdfContentEditor()) {
    editor.bindPdf("input.pdf");
    editor.replaceText("old text", "new text");
    editor.save("output.pdf");
}

TextReplaceOptions 텍스트 일치 및 교체하는 경우를 합니다.

텍스트 추출

PdfExtractor 페이지별 텍스트 추출 API를 제공합니다. 호출 후 extractText(), 이테레이트와 함께 hasNextPageText() / getNextPageText().

본문 참조 Facades 페이지 전체에 대한 PdfExtractor 예제입니다.

또 보기

 한국어