poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominik Stadler <dominik.stad...@gmx.at>
Subject Re: paragraph.spacingBefore() is returning 0 for binary DOC file.
Date Thu, 02 Jul 2015 09:32:47 GMT
Obviously nobody knows the answer right away so unfortunately your
only possibility will be to debug this and look at the source code to
find out where the information is in the objects and why it is not
returned correctly.

Dominik.

On Thu, Jul 2, 2015 at 7:13 AM, Shiva Kumar <shiva.k@pawaa.com> wrote:
> Hi, I asked this question before but I did not got any response, I think
> this is a bug. In this below code I am reading paragraph properties from a
> DOC which was DOCX file converted to DOC from Word 2007 application.
>
>
>
> I have attached the DOC sample and the code to test the paragraph
> properties. Below is the sample portion from it.
>
>
>
> THE PROBLEM IS : the values of some paragraphs are not at all zero but
> paragraph object returns 0 value. Why?
>
>
>
> int ps = s.numParagraphs();// s-> section object
>
>                                                                 Paragraph
> paragraph;
>
>                                                                 for (int j =
> 0; j < ps; j++) {
>
>
> paragraph = s.getParagraph(j);
>
>
> int spacebfr = paragraph.getSpacingBefore();
>
>
> if(spacebfr == 24)
>
>
> System.out.println("returning correct value");
>
>
> int spaceafr = paragraph.getSpacingAfter();
>
>
> if(spaceafr == 8)
>
>
> System.out.println("returning correct value");
>
>                                                                 }
>
>
>
>
>
> Thank You
>
>
>
> SHIVA KUMAR K R
>
> Phone : +91 9844831440
>
> Linkedin : shiva_kumar_k_r
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org

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


Mime
View raw message