Page 1 of 1

*ERROR* PropertyResolver: style: BodyText has no PPr

PostPosted: Fri Sep 14, 2012 3:03 am
by jallen
Hi Jason,

I'm getting the following errors when parsing a word doc. The file was created in Word 2010.

*ERROR* PropertyResolver: style: BodyText has no PPr (PropertyResolver.java, line 634)


I see the relevant code in docx4j but i'm not sure the significance of these errors.

Code: Select all
      PPr expressPPr = s.getPPr();
      if (expressPPr==null) {
         log.error("style: " + styleId + " has no PPr");
         String normalId = this.styleDefinitionsPart.getDefaultParagraphStyle().getStyleId();         
         resolvedPPr = resolvedStylePPrComponent.get(normalId);
         return resolvedPPr;
      }


Its unclear to me why the file would be missing PPr data.
I attached the relevant word doc.

Thanks,
Jeff

Re: *ERROR* PropertyResolver: style: BodyText has no PPr

PostPosted: Fri Sep 14, 2012 9:19 am
by jason
Hi Jeff

Yes, it does seem a little strange that a paragraph level style would define no paragraph level properties, but it does make sense (in this case it is changing the font size, which is a run-level property).

So it is nothing to worry about. I've changed the log level from ERROR to DEBUG.

cheers .. Jason