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 2012/07/17 09:40:03 UTC

[Bug 53556] New: Mispositioned Textboxes In Reading Doc Files Through HWPF

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

          Priority: P2
            Bug ID: 53556
          Assignee: dev@poi.apache.org
           Summary: Mispositioned Textboxes In Reading Doc Files Through
                    HWPF
          Severity: major
    Classification: Unclassified
                OS: Linux
          Reporter: vipulucky93@gmail.com
          Hardware: PC
            Status: NEW
           Version: 3.8
         Component: HWPF
           Product: POI

Created attachment 29070
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29070&action=edit
This is the document which i was unable to read properly.

I tried reading doc and docx files using Apache POI 3.8. It worked fine until i
encountered textboxes.

If the format of the document is like this: 
paragraph 1 
textbox 1 
paragraph 2 
textbox 2 
paragraph 3 

Then the output should be: 
paragraph 1 textbox 1 paragraph 2 textbox 2 paragraph 3 
But HWPF reads such .doc file as: 
paragraph 1 paragraph 2 paragraph 3 textbox 1 textbox 2 

It seems to be adding textboxes at the end and not at the place where it should
be, i.e. between the paragraphs.

In case of .docx files, XWPF didn't read textboxes at all.

I tried methods getText(), getTextFromPieces(), extractText(),
getParagraphText(), but none of these helped.

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


Re: [Bug 53556] New: Mispositioned Textboxes In Reading Doc Files Through HWPF

Posted by amit2941 <am...@gmail.com>.
Hi Guys,

You can get the textbox information from OfficeDrawings(just like shapes).
It fetches the position too. To fetch the text inside this textbox, you have
to read from the textbox range.

I would like to know how to associate this text with the textbox. Is there
any ID which related the two?

Regards,
Amit



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-53556-New-Mispositioned-Textboxes-In-Reading-Doc-Files-Through-HWPF-tp5710465p5714697.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 53556] Mispositioned Textboxes In Reading Doc Files Through HWPF

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

Vipul Kumar <vi...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |APIBug
                 CC|                            |vipulucky93@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 53556] Mispositioned Textboxes In Reading Doc Files Through HWPF

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

--- Comment #1 from Sergey Vladimirov <vl...@gmail.com> ---
Vipur,

Textboxes are graphical objects. Currently POI unable to detect exact place for
textbox to be placed on the page. Another problem -- textbox can be anchored to
the page (not to some paragraph), and there is no way to detect position in
text to insert textbox content without page rendering (which POI doesn't).

Patches to detect textbox anchors position (exact point to insert text box
content into document) are always welcomed.

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