Skip to content

[landing] render: pptx/pdf 페이지를 로컬에서 이미지로 렌더하고 image.page descriptor 로 연결 #2

Description

@younjihoon

목표

CLIP·검출·캡션 같은 시각 enricher 의 입력은 페이지 이미지다. 서버는 렌더를 하지 않기로 했으므로(LibreOffice 의존·CPU), CLI 가 로컬에서 렌더한다. business 테넌트용 서버 배치 워커도 결국 이 코드를 돌린다.

동작

cloudbtl render <prop_id | file> [--dpi 110] [--out ~/.cloudbtl/cache/<hash>/] [--upload]
  • pptx/docx → soffice --headless --convert-to pdf → pdf. (LibreOffice 는 선택 의존: 없으면 명확한 안내 후 종료.)
  • pdf → 페이지 PNG. 래스터라이저는 pdftoppm(poppler) 또는 mutool 중 설치된 것 자동 감지; 둘 다 없으면 안내.
  • 출력은 콘텐츠 해시 기준 캐시 디렉터리(~/.cloudbtl/cache/<contentHash>/p<N>.png). 같은 파일은 다시 렌더하지 않는다.
  • --upload: 각 PNG 를 이미지 에셋으로 올리고(POST /api/assets, private) URL 을 image.page descriptor 에 기록:
    { url, width, height, dpi, sha256 } (page = N). producer cloudbtl-cli.
  • --upload 없으면 로컬 캐시만 만들고 enrich 가 그 경로를 읽는다.

열린 결정

  • 페이지 이미지의 저장 위치: (a) cloudbtl assets(Pro+ 기능, 용량 과금 대상) (b) 고객 자체 스토리지 URL (c) 저장 안 하고 로컬 캐시만. 기본은 (c), --upload 는 (a). (b) 는 후속.
  • 이미지 자체를 descriptor payload 에 넣지 않는다(1MB 상한, 스펙 §7 권고).

완료 기준

  • 113MB pptx 를 render 하면 슬라이드 수만큼 PNG 가 캐시에 생기고, 두 번째 실행은 즉시 끝난다.
  • --upload 후 descriptors -k image.page 에 URL 이 보이고 브라우저에서 열린다(로그인 상태).

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlanding-layerLanding layer: local extraction, render, enrich, watch, bulk land

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions