Coder Social home page Coder Social logo

Comments (4)

neolord0 avatar neolord0 commented on August 23, 2024

문서 내에 컨트롤의 위치를 알려면, 문서를 그려야 합니다.
한글과 같은 워드 프로세서들은 문단을 나열하는 방식으로 문서 전체를 표현합니다.
파일 내부에는 페이지나 줄, 칸에 대한 내용이 없습니다. 어떤 컨트롤의 위치를 알려면, 이 컨트롤이 이전에 문단들의 크기를 구해서 더해야 합니다.

kunok2님이 요구한 기능을 구현하려면 한글 뷰어에 준하는 프로그램을 만들어야 합니다만, 이 기능은 시간/실적에 부족으로 지원하지 못 하고 있습니다.

from hwplib.

kunok2 avatar kunok2 commented on August 23, 2024

답변 감사드립니다.^^

from hwplib.

kunok2 avatar kunok2 commented on August 23, 2024

kr.dogfoot.hwplib.object.bodytext.paragraph.lineseg.LineSegItem 클래스를 이용하여 문서 내에서 라인의 수를 구했습니다.^^
그런데 문제는 몇번째 페이지에 속하는지 인데
혹시 어떤 클래스의 값을 이용해서 어찌어찌하면 되겠다는 힌트정도 얻을 수 있을까요?
부탁드립니다.

from hwplib.

neolord0 avatar neolord0 commented on August 23, 2024

음.. 한글과 같은 워드 프로세서들은 일반적으로 용지크기에 공간에 문단들을 채워 넣다가, 채워 넣을 공간이 부족하면 그 때, 새로운 페이지를 추가하는 방식으로 처리합니다.문단을 크기를 알려면, 문단에 포함된 글자와 컨트롤들의 크기를 알아야 하는데, 문단 모양 속성, 글자 모양 속성들이 모두 다 적용해서 계산해야만 합니다.

특정 값으로 간단히 계산할 수 있는 것이 아니라, hwp 파일에 포함된 거의 모든 속성을 다 사용해서 계산해야 합니다.

현재로써는 이 라이브러리로는 불가능하고요. hwp파일을 지원하는 오픈 오피스 쪽 라이브러리나, 사이넵 같은 뷰어 기술이 있는 상용 라이브러리로 사용해야 할 거 같습니다.

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.