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 2017/09/25 14:09:45 UTC

[Bug 61562] New: [POI][Custom Properties][DOC] Office Warning validation when we add custom properties to ".doc" files

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

            Bug ID: 61562
           Summary: [POI][Custom Properties][DOC] Office Warning
                    validation when we add custom properties to ".doc"
                    files
           Product: POI
           Version: 3.15-FINAL
          Hardware: PC
            Status: NEW
          Severity: regression
          Priority: P2
         Component: POIFS
          Assignee: dev@poi.apache.org
          Reporter: jonathan.trichereau@cgi.com
  Target Milestone: ---

Created attachment 35373
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35373&action=edit
Information indicated in Bug Description

Hello,

When addwe add custom properties to a Microsoft Office Word 97 - 2003 document
with POI, it works fine. But when we try to open Word document with Office
2007, a warning about Office file validation appears.

If we click on "Open", we can see our custom properties added.

Is there a way to modify code to avoid this message when we open the file in
Office ?

We reproduce the issue with POI 3.15, 3.16 and 3.17.

Currently, we use POI 3.10 and we don't have this issue but we need to upgrade
POI to resolve other issues in our application.

Also, we passed Office validation tool (BFFValidator) and we have the following
results :
- Before modify custom properties, file passed in validator
- After modify custom properties, file failed in validator.

As attachment, you can find in ZIP file :
- Code that we use to reproduce the issue : PbWarningValidationOffice.java
- The original file : beforePOI.doc
- The file modified with custom properties : afterPOI.doc
- XML File returned by Office validation tool when the validation failed :
afterPOI.doc.bffvalidator.09-25-17_15-54-22.xml
- Warning when we open file modified in Office : WarningOfficeValidation.jpg

Thanks you for your help.

Best Regards,
Jonathan TRICHEREAU.

-- 
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 61562] [POI][Custom Properties][DOC] Office Warning validation when we add custom properties to ".doc" files

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

--- Comment #3 from jonathan.trichereau@cgi.com ---
Hello Dominik, 

Thanks you for your reply.

For me, it doesn't look like a Word limitation but a issue with POI and
NPOIFSFileSystem object: for example, with the document that I put in
attachment (afterPOI.doc), if we open this document in Word, we have the Office
validation warning. But if we do "save as" on this document in a new file (for
example afterPOI2.doc), this file can be open in Word without warning and we
have all the custom properties.

Also, if we launch the java program with the file that I added in new
attachment (docDoc03.doc), new file can be open without warning and we have all
the custom properties.

It seems that the structure of the new Word generated with POI does not
necessarily follow the specifications checked in the Office validation module.

-- 
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 61562] [POI][Custom Properties][DOC] Office Warning validation when we add custom properties to ".doc" files

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

--- Comment #2 from jonathan.trichereau@cgi.com ---
Created attachment 35409
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35409&action=edit
Document that work with 1000 custom properties

-- 
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 61562] [POI][Custom Properties][DOC] Office Warning validation when we add custom properties to ".doc" files

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
As far as I see the number of custom properties is mainly limited inside Word
here. I.e. your sample works with 50 custom properties, but leads to a corrupt
file with 100, the actual limit is somewhere between. 

I could not find anything in the spec detailing what the limit is exactly,
though, so it is hard to put in some limits in Apache POI as it seems to be
specific to Microsoft Word itself...

Explorer does show 1000 properties fine, so I don't see anything that we can do
inside Apache POI for now until there is some specification from Microsoft that
explains how many properties are possible for certain types of documents.

-- 
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 61562] [POI][Custom Properties][DOC] Office Warning validation when we add custom properties to ".doc" files

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

jonathan.trichereau@cgi.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |---

-- 
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 61562] [POI][Custom Properties][DOC] Office Warning validation when we add custom properties to ".doc" files

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |NEW

-- 
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 61562] [POI][Custom Properties][DOC] Office Warning validation when we add custom properties to ".doc" files

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

-- 
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