You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2024/02/13 10:10:47 UTC

[Bug 68615] New: getSummaryInformation brokes document images

https://bz.apache.org/bugzilla/show_bug.cgi?id=68615

            Bug ID: 68615
           Summary: getSummaryInformation brokes document images
           Product: POI
           Version: 5.2.3-FINAL
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: HPSF
          Assignee: dev@poi.apache.org
          Reporter: 1umos@protonmail.com
  Target Milestone: ---

Created attachment 39580
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=39580&action=edit
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?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 68615] getSummaryInformation breaks document images

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68615

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|getSummaryInformation       |getSummaryInformation
                   |brokes document images      |breaks document images

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 68615] getSummaryInformation breaks document images

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68615

Matafagafo <ma...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matafagafo@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 68615] getSummaryInformation breaks document images

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68615

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
It seems reading the summary-information is not necessary, the following is
sufficient to trigger this for me:

        try (HWPFDocument doc = new HWPFDocument(new
FileInputStream("/tmp/file-sample_100kB.doc"))) {
            try (OutputStream outputStream = new
FileOutputStream("/tmp/output.doc")) {
                doc.write(outputStream);
            }
        }

Unfortunately support for doc/docx is not complete and no-one is actively
working on it, so patches/fixes are highly welcome!

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org