Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hwp 파일 write시 파일버전정보(fileHeader)와 docInfo가 잘 셋팅이 안되는 현상이 있습니다. #204

Closed
hyowong opened this issue Jan 13, 2023 · 1 comment

Comments

@hyowong
Copy link

hyowong commented Jan 13, 2023

언제나 neolord0에 감사하고 있습니다. 다음과 같은 질문이 있습니다.
원본파일 a.hwp 이 있다고 가정합니다. 이를 rewriting_HWPFile.java 소스를 이용해서 리라이팅했을 때,
a.hwp 를 열어 문서정보를 확인해보면 일반탭에 있는 문서버전이 5.1.0.1.1이고, 문서요약 정보가 리라이팅된 hwp 파일에서 확인해보면 문서버전도 카피가 안돼 공백인듯 합니다. 그리고 문성약에서 저자명도 카피가 안되고요. 소스적으로 디버깅해보면 카피하고 있는 듯 한데 확인 가능하실까요?

감사합니다.

@neolord0
Copy link
Owner

안녕하세요..
문서요약 정보에 대한 읽고 쓰는 기능이 추가되었습니다.
POI 코드에 있는 SummaryInformation 클래스를 이용하여 구현했습니다.
다시 받아서 테스트 해 보세요.

        HWPFile hwpFile = HWPReader.fromFile("test.hwp");
        System.out.println(hwpFile.getSummaryInformation().getTitle());
        hwpFile.getSummaryInformation().setTitle("제목-테스트-re");
        HWPWriter.toFile(hwpFile, "rewrited_test.hwp");

        HWPFile hwpFile2 = HWPReader.fromFile("rewrited_test.hwp");
        System.out.println(hwpFile2.getSummaryInformation().getTitle());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants