io.open

open_file / new_document.

노트

API 시그니처와 docstring 은 Python 소스에서 자동 생성되어 영문으로 표시됩니다.

open.open_file

io.open.open_file(app, path, format=None)

Open path in app and return the absolute path opened.

Parameters

Name Type Description Default
app hwpapi.App Live App instance. required
path str | Path File path (relative resolved against cwd). required
format str HWP format string ("HWP", "PDF", "HWPX" …). None lets HWP auto-detect. None

Raises

Name Type Description
FileIOError Wraps any COM error raised by :meth:App.open, with the path included in the message.

open.new_document

io.open.new_document(is_visible=True)

Create a fresh :class:~hwpapi.App backed by a blank document.

Thin helper around :meth:hwpapi.App.new — prefer this when reading linearly in io-heavy scripts so the hwpapi.io namespace exposes the full open/new/export lifecycle.

Raises

Name Type Description
FileIOError If the underlying :meth:App.new raises a COM error (rare — usually means HWP can’t be dispatched at all).
맨 위로