Skip to main content

I want to create Justify aligned Paragraphs in a docx file. I created a custom Heading with Justify alignment in a seed file and input the text via a MSWordStyler transformer with Content Type: Heading and Heading Level: Heading X. but I can't get the text to display correctly. It always spreads the last line. I even tried to use CR and LF in the Text Editor.

The text outputs like this:

I would like the text to diplay like this:

Transformer setings:

 

Any ideas on how I should configure this to display correctly?

Hi @caracadrian,

Unfortunately, I don't believe this functionality is available with headings at the moment as it looks like the Alignment/Justification of can only be applied to paragraphs from the library that this writer uses. This would make for a great submission on the FME Ideas Page though.

 

The only workaround I can think of for this would be to set the content type to Paragraph and change the styling to match the H1 style which. Not ideal, but it will help get your text styled like headings.

For example for Heading 1 you could set the Font to Calibri Light, size 16 font, and set the alignment to Fully Justified.

 

Alternatively, you could try out a template file. In the template file, you would have to modify the style of Heading 1 (or whatever heading you are targeting) and alignment in the heading style itself. Not sure how successful this will be but it might be worth a shot!

Once you modify the style, save the .docx and set that as the Basefile in the Word Writer parameters:


Hi @caracadrian,

Unfortunately, I don't believe this functionality is available with headings at the moment as it looks like the Alignment/Justification of can only be applied to paragraphs from the library that this writer uses. This would make for a great submission on the FME Ideas Page though.

 

The only workaround I can think of for this would be to set the content type to Paragraph and change the styling to match the H1 style which. Not ideal, but it will help get your text styled like headings.

For example for Heading 1 you could set the Font to Calibri Light, size 16 font, and set the alignment to Fully Justified.

 

Alternatively, you could try out a template file. In the template file, you would have to modify the style of Heading 1 (or whatever heading you are targeting) and alignment in the heading style itself. Not sure how successful this will be but it might be worth a shot!

Once you modify the style, save the .docx and set that as the Basefile in the Word Writer parameters:

Hi @chrisatsafe

None of the workarounds you suggested work (at least for me).

I already use a Basefile (I mentioned seed file in my original post) with configured Headings and that messes up the styling.

And your suggestion to set the Content type to Paragraph messes up the text even more.

I think the problem is with the line termination encoding.

I will try to create a new clean Basefile and see what happens.

I created a submission to the Ideas Page here


Reply