Coder Social home page Coder Social logo

헤더푸터 about hwplib HOT 1 CLOSED

neolord0 avatar neolord0 commented on July 21, 2024
헤더푸터

from hwplib.

Comments (1)

neolord0 avatar neolord0 commented on July 21, 2024

답변이 늦었군요...

hwp에서 헤더(머리말)이나 푸터(꼬리말)을 추가하면, 파일 내부에서 해당 문단에 머리말 컨트롤이나 꼬리말 컨트롤이 생성됩니다.

머리말/컨트롤 컨트롤은 문단 리스트를 포함하고 있는데, 여기에 이미지나 텍스트를 추가하면 가능할 거 같습니다.
아마도 섹션(Section)에 첫 번째 문단(Paragraph)에 컨트롤 리스트에 이 컨트롤들이 있을거라 생각됩니다.

HWPFile hwpFile = HWPReader.fromFile(filename);
if (hwpFile != null) {
Section s = hwpFile.getBodyText().getSectionList().get(0);
Paragraph firstParagraph = s.getParagraph(0);
int headerIndex = 구해야 함...
ControlHeader header = (ControlHeader) firstParagraph.getControlLIst().get(headerIndex);
ParagaphList headerParaList = header.getPararaphList();
}

headerParaList에서 이미지나 텍스트를 가져다 사용할 수 있습니다.
대략 이런 식으로 가능할 것입니다.

설명이 부족한 부분이 있으시면.. 다시 질문해주세요..

from hwplib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.