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 2011/07/21 15:22:52 UTC

DO NOT REPLY [Bug 51539] New: cannot retain format for word document[.doc] [HWPFDocument]

https://issues.apache.org/bugzilla/show_bug.cgi?id=51539

             Bug #: 51539
           Summary: cannot retain format for word document[.doc]
                    [HWPFDocument]
           Product: POI
           Version: 3.8-dev
          Platform: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: HWPF
        AssignedTo: dev@poi.apache.org
        ReportedBy: sanmoy@gmail.com
    Classification: Unclassified


Created attachment 27306
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27306
test input file for hwpf

I had written a simple code

FileInputStream fileInputStream = new FileInputStream(new File("C:\\in.doc"));
FileOutputStream fileOutputStream = new FileOutputStream(new
File("C:\\out.doc"));
HWPFDocument hwpfDocument = new HWPFDocument(fileInputStream);
hwpfDocument.write(fileOutputStream);

After executing the code, output file doesn't retain the original format. All
lines have the same font, size, color of the first line. 

Again,
The below code executes perfectly ( for .docx )

FileInputStream fileInputStream = new FileInputStream(new File("C:\\in.docx"));
FileOutputStream fileOutputStream = new FileOutputStream(new
File("C:\\out.docx"));
XWPFDocument docx = new XWPFDocument(fileInputStream);
docx.write(fileOutputStream);

xwpf and hwpf behavior should be consistent

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 51539] cannot retain format for word document[.doc] [HWPFDocument]

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

Sergey Vladimirov <vl...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
         OS/Version|                            |All

--- Comment #2 from Sergey Vladimirov <vl...@gmail.com> 2011-07-22 07:53:26 UTC ---
Unable to reproduce using latest code from trunk.

Sanmoy, could you try to use latests JARs from
http://encore.torchbox.com/poi-cvs-build/ ?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 51539] cannot retain format for word document[.doc] [HWPFDocument]

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

sanmoy <sa...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from sanmoy <sa...@gmail.com> 2011-07-22 09:34:44 UTC ---
I had tested with poi 3.8-beta3-20110606 which has the problem. This release is
available from http://poi.apache.org/download.html.

Now, i have tested with poi-3.8-beta4-20110722, and the code is working fine.

Thank you all for your great effort.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 51539] cannot retain format for word document[.doc] [HWPFDocument]

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

--- Comment #1 from sanmoy <sa...@gmail.com> 2011-07-21 13:24:36 UTC ---
Created attachment 27307
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27307
test output file for hwpf

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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