poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Lucazeau <glucaz...@gmail.com>
Subject XSLFTable is empty when generated on Apache Felix/Sling server, works fine from standalone code
Date Thu, 11 Aug 2016 14:19:13 GMT
Hello,

We use Apache POI 3.14 to generate a PPTX document from Apache Sling
content, using the bundle org.apache.servicemix.bundles.poi.

For testing content we created a very light OSGi bundle, with one servlet
and one method to generate a small table:

    XMLSlideShow ppt = new XMLSlideShow();

    // XSLFSlide#createSlide() with no arguments creates a blank slide
    XSLFSlide slide = ppt.createSlide();

    XSLFTable tbl = slide.createTable(1, 2);
    tbl.setAnchor(new Rectangle2D.Double(0, 0, 500, 500));

    FileOutputStream out = new FileOutputStream("/path/to/doc.pptx");
    ppt.write(out);
    out.close();

    ppt.close();

When this code runs from a JUnit test in Eclipse, the table is correctly
generated. But when we deploy this in Felix and execute the doc from a
servlet, the table in the generated document is only one empty cell.

In debugging mode, we can see that XSLFTable objects contains rows and
cells, but in the XSLFSlide, the related shape does not contain rows and
cells, just:

<main1:tbl>
  <main1:tblPr/>
  <main1:tblGrid/>
</main1:tbl>

What could interact with POI in Felix environment? How shapes are updated
from creates XSLF objects?

Any track to debug this strange issue would be really helpful.

Thank you for your help

Guillaume

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message