HWPX icon

HWPX

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

콘텐츠 → 이미지 교체

AI-generated

Summary

Replace an existing image in an HWPX document with a new image, specifying the source of both the original document and the replacement image.

Inputs

  • 입력 방식 (required) — Select the input method of the HWPX file to be modified: either binary data from a workflow item property or a URL to download the file from.
  • 입력 바이너리 속성 (required) — Name of the binary property containing the input HWPX file when "바이너리 데이터" input method is chosen.
  • 파일 URL (required) — URL of the HWPX file to download when "URL" input method is chosen.
  • 이미지 입력 방식 (required) — Select the input method for the replacement image: either binary data or a URL.
  • 이미지 바이너리 속성 (required) — Name of the binary property containing the replacement image (PNG, JPG, GIF, BMP) when "바이너리 데이터" is selected as image input method.
  • 이미지 URL (required) — URL of the replacement image file when "URL" is selected as image input method.
  • 대상 이미지 — Identifier for the target image to replace within the HWPX file (filename, ID, or index). Defaults to the first image if left empty.
  • 출력 바이너리 속성 — Name of the binary property in which to store the modified HWPX file with the replaced image.
  • 옵션: 너비 (Mm) — Width in millimeters for displaying the new image. Set 0 to keep the original size.
  • 옵션: 높이 (Mm) — Height in millimeters for displaying the new image. Set 0 to keep the original size.

Output shape

a single binary property containing the modified HWPX file with the replaced image

The output binary property name defaults to "data" if not specified. The operation only modifies the specified image; if no target image identifier is given, it replaces the first image found. The input HWPX file and the new image can be supplied as binary data or downloaded via URL.

Examples

Example 1: Replace the first image in an HWPX document supplied as binary data, with a new image also from binary data, keeping original image size.

Set 입력 방식 to 바이너리 데이터, specify input 바이너리 속성 as 'data'; set 이미지 입력 방식 to 바이너리 데이터, specify 이미지 바이너리 속성 as 'image'; leave 대상 이미지 empty.

Example 2: Replace a specific image by filename in an HWPX document downloaded from URL, using a replacement image from URL, resizing to 100mm width and 50mm height.

Set 입력 방식 to URL with the document URL; set 이미지 입력 방식 to URL with the image URL; specify 대상 이미지 with filename; set 옵션 너비 and 높이 to 100 and 50 respectively.

Links

Discussion