Bug 55568 - Failed to create a tab in *.docx with standard means
Summary: Failed to create a tab in *.docx with standard means
Alias: None
Product: POI
Classification: Unclassified
Component: XWPF (show other bugs)
Version: 3.10-dev
Hardware: PC All
: P5 major (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2013-09-19 07:52 UTC by Sergei Tsypanov
Modified: 2016-04-07 21:07 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Tsypanov 2013-09-19 07:52:22 UTC
Hi everyone,

I use POI for generating reports and have recently run into the following issue:

I need to set a tab for a header paragraph and used the following code:

CTTabs ctTabs = paragraph.getCTP().addNewPPr().addNewTabs();
CTTabStop ctTabStop = ctTabs.addNewTab();

First I was sure the reason is the use of wrong means, however when I opened test.docx with some tabbed text as zip archive and parsed document.xml I found the following element:

        <w:tab w:val="left" w:pos="1985"/>
        <w:lang w:val="en-US"/>

So the code seems to be correct comparing with actual xml markup.

Why then I fail to create the same with my code?
Comment 1 Dominik Stadler 2016-04-07 21:07:30 UTC
It seems nobody could answer this question over the years. BTW, for such usage questions you are more likely to get answers if you post on stackoverflow.