Device (디바이스)

다양한 형식 핸들러(pdf, xps 등)는 페이지를 “디바이스”로 해석합니다. 디바이스는 페이지로 수행할 수 있는 모든 작업(렌더링, 텍스트 추출, 검색)의 기반입니다. 디바이스 유형은 선택한 생성 방법에 의해 결정됩니다.

클래스 API

class Device
__init__(self, object, clip)

픽셀 맵 또는 디스플레이 리스트 디바이스의 생성자.

매개변수:
  • object (Pixmap or DisplayList (디스플레이 리스트)) – Pixmap 또는 DisplayList 중 하나.

  • clip (IRect) – Pixmap 디바이스의 선택적 IRect 로, 페이지의 특정 영역으로 렌더링을 제한합니다. 전체 페이지가 필요한 경우 None 을 지정하세요. 디스플레이 리스트 디바이스의 경우 이 매개변수는 생략해야 합니다.

__init__(self, textpage, flags=0)

텍스트 페이지 디바이스의 생성자.

매개변수:
  • textpage (TextPage) – TextPage 객체

  • flags (int) – 텍스트가 텍스트 페이지로 파싱되는 방식을 제어하는 플래그입니다. 현재 3가지 옵션을 이 매개변수에 코딩할 수 있으며, 글꼴 속성 를 참조하세요. 이러한 옵션을 설정하려면 flags=0 | TEXT_PRESERVE_LIGATURES | ... 와 같은 형식을 사용하세요.

This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at artifex.com or contact Artifex Software Inc., 39 Mesa Street, Suite 108A, San Francisco CA 94129, United States for further information.