THotPDF.SetLoadedFreeTextPlainText Method

지원되는 로드된 FreeText annotation을 명시적으로 왼쪽 정렬 일반 텍스트로 변환하고 normal appearance를 다시 만듭니다

선언

procedure SetLoadedFreeTextPlainText(PageIndex, AnnotationIndex: Integer;
  const AText: AnsiString; FontSize: Single = 12);

유닛: HPDFDoc · Version 2.753.0부터 지원

매개변수

모양 변환

이 메서드는 검은색 Helvetica 텍스트와 검은색 사각 테두리를 사용하고, 지원되는 device 색상 배경과 solid 또는 dashed 테두리 형태는 유지하며, 텍스트를 annotation 사각형 안쪽 2포인트 inset으로 클립합니다

줄 간격은 글꼴 크기의 1.2배입니다. 자동 줄바꿈이나 shrink-to-fit이 없으므로 inset 밖의 텍스트는 잘립니다

변환은 /AP를 교체하고 /Contents와 /DA를 갱신하며 /Q를 0으로 설정하고 /RC, /DS, /AS를 제거합니다. 기존 rich text, 글꼴 선택, 텍스트 색상, 정렬, appearance 상태는 의도적으로 교체됩니다

annotation, appearance, 페이지 변경은 증분 저장에 등록되고 페이지 render cache는 무효화됩니다. 재작성 저장 역시 새 appearance를 유지합니다

지원 입력과 오류

annotation이 존재하고 subtype이 FreeText이며, 유한한 사각형이 4포인트보다 넓고 높아야 합니다

callout, 사각형 difference 또는 inset, border effect, rotation 항목, FreeText가 아닌 intent, 불투명하지 않은 annotation, 둥근 테두리, solid나 dashed가 아닌 테두리 스타일은 EArgumentException으로 거부됩니다

DeviceGray, DeviceRGB, DeviceCMYK 배경 구성 요소는 0 이상 1 이하여야 하고, 테두리 두께와 dash 패턴은 유효하고 유한하며 음수가 아니어야 합니다. 비어 있지 않은 전부 0인 dash 패턴은 거부됩니다

지원되지 않는 입력은 annotation이나 appearance를 교체하기 전에 검증됩니다

예제

페이지 0의 첫 annotation이 지원되는 FreeText annotation인 로드된 문서를 대상으로 합니다

PDF.SetLoadedFreeTextPlainText(0, 0,
  'Updated review note'#13#10'Second line', 12);

관련 API

SetLoadedAnnotationContents는 저장된 contents 문자열만 바꾸고 기존 appearance를 유지합니다

SetLoadedFreeTextRichText · AddLoadedFreeTextAnnotation · THotPDF · 홈