Bug 68615 - getSummaryInformation brokes document images
Summary: getSummaryInformation brokes document images
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: HPSF (show other bugs)
Version: 5.2.3-FINAL
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-13 10:10 UTC by 1umos
Modified: 2024-02-13 10:10 UTC (History)
0 users



Attachments
original sample file (98.00 KB, application/msword)
2024-02-13 10:10 UTC, 1umos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 1umos 2024-02-13 10:10:47 UTC
Created attachment 39580 [details]
original sample file

I tried to change the document's Author with setAuthor(), then i figured even if i just called getSummaryInformation() and save the file, document's images are corrupted and seen as "Read Error"

My test code is:

POIFSFileSystem originalFile = new File(file);
HWPFDocument doc = new HWPFDocument(originalFile);
SummaryInformation summaryInfo = doc.getSummaryInformation();

FileOutputStream outputStream = new FileOutputStream(tmpFile);
doc.write(outputStream);

outputStream.close();
doc.close();

Is problem is specific to document or POI can't process file correctly?