HWPX icon

HWPX

HWPX/HWP 문서 읽기, 생성, 편집, 변환, 유효성 검사

콘텐츠 → 수식 삽입

AI-generated

Summary

Insert a mathematical equation into a HWPX document file at the specified position, using a Hancom Equation script to define the formula.

Inputs

  • inputSource (required) — Select the file input method as either 'binary' to use binary data from the workflow or 'url' to fetch the HWPX file from a given URL.
  • inputBinaryPropertyName (required) — If using binary input, specify the name of the binary property containing the HWPX file data (default: 'data').
  • fileUrl (required) — If using URL input, provide the URL to download the HWPX file.
  • equationScript (required) — Enter the Hancom equation script that describes the formula to insert, e.g., "x^2 + 2x + 1" or "sum _{k=1} ^{n} k". This is not LaTeX syntax.
  • outputBinaryPropertyName — Name the binary property to store the modified HWPX file after inserting the equation (default: 'data').
  • options — Optional settings including insertion position ('append' to document end or 'prepend' to start), base font unit size (e.g., 1000 for 10pt), text color in hex format, and optional prefix or suffix text to display before or after the equation.

Output shape

a modified HWPX file including the inserted equation, returned as binary data under the specified output property name.

The operation requires providing either a binary HWPX file or a URL to a HWPX file as input. The equation is inserted without replacing existing content unless positioned at the start (prepend) or appended at the end. The output binary data represents the updated file compatible with Hancom software supporting HWPX format.

Examples

Example 1: Insert the equation 'x^2 + 2x + 1' at the end of a HWPX document binary loaded in the 'data' property, outputting the updated file also in 'data'.

Set 'inputSource' to 'binary', 'inputBinaryPropertyName' to 'data', provide 'equationScript' as 'x^2 + 2x + 1', and leave 'options.position' as 'append'.

Links

Discussion