Getting paragraph styles in apache POI, language specific

Mark Stroeven

Is it possible to get the styles of a paragraph in a particular langage ?. For example: on my personal computer I happen to have a dutch installation of microsoft windows. this is resulting in the paragraph.getStyles() method returning the dutch values of the styles, instead of a normal value of "heading1", "heading2" etc I am receiving values such as"Kop1", "kop2".

I am creating a parser for word based documents which selects certain parts on style. does anyone have any experience with this ?

enter image description here

enter image description here

centic

I would take a look at the data in the .docx file (it's a zip-file) to verify if the data is written this way by Word already or "transposed" by POI or some local functionality.

If the data is already written by Word you will need to check how you can create the document in a different language in Word.

If not, then if you are using POI 3.13 or newer, you can try to set a different locale via LocaleUtil.setUserLocale() and see if that affects the results.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Different styles in one paragraph Apache poi

apache poi get paragraph relative to other table or paragraph

Apache POI Word using custom styles for titles

How to resize picture to paragraph size using Apache POI?

Apache poi: insert text in a paragraph and view track changes in a word document

How to partially bold a Paragraph in Apache POI? (Word Documents)

How to remove a line break when creating a text paragraph with apache POI

Apache POI Mirroring Words in Arabic Language

Apache POI style getting applied to all cells

getting data by column name apache poi excel

Getting Excel fill colors using Apache POI

Creating custom color styles for an XSSFWorkbook in Apache POI 4.0

Losing styles when create a PDF from a .docx with Apache POI and Pdfbox

How to copy paragraphs include character styles to new document in apache poi?

Apache POI Word to Clean Html without styles or unnecessary tags

Change specific lines in a word file with Apache POI

Getting a nullPointerException in getting getLastCellNum() method in a blank Row, using apache poi

Getting text between the beginning of a paragraph and a specific link using jQuery

how change text direction(not paragraph alignment) in document in apache poi word?(XWPF)

How do you add an XDDF Chart to a specific paragraph run (i.e. a cell in a table)? POI 4.0.1

How to avoid resetting paragraph and list item styles for some specific region without custom classes for each one?

Getting text style from docx using Apache poi

getting error when adding bullet to word document with apache poi

Getting the lines of each paragraphs of a docx with Apache-POI

Apache POI - Getting a null pointer while reading a cell with value

Getting Apache POI to work with Java on Eclipse - how to build

Getting imdb movie titles in a specific language

how to set specific cell width in different row in apache poi table?

Write Double value in numeric cell with specific format in Apache Poi 3.7