Scribus Forums

Scribus => Scripts and Plugins => Topic started by: apastuszak on July 02, 2012, 07:07:27 pm

Title: Fully justifying a text box using Scripter
Post by: apastuszak on July 02, 2012, 07:07:27 pm
I've been spending the last 3 days scripting Scribus to get it to automatically create a stamp album page off of data in a CSV file and things have been going well.

The only problem I am facing, is trying to take a block of text and fully justify it.

I am using the following code:

setTextAlignment(ALIGN_BLOCK, B)

That line sets the text to Force Justified

I tried using ALIGN_FORCED and that also does a force justified text block.

I need the text to be justified, so the last line isn't force
justified, leaving a big gap between all the words in the last line.
Title: Re: Fully justifying a text box using Scripter
Post by: apastuszak on July 02, 2012, 11:09:16 pm
Ok, I seem to have solved my own problem.  It seems that the constants ALIGN_FORCED and ALIGN_BLOCK are both set to an integer value of 4.  ALIGN_BLOCK should probably be set to 3.  When I removed ALIGN_BLOCK and replace it with a 3, then things fully justify. Sounds like I need to file a bug report.
Title: Re: Fully justifying a text box using Scripter
Post by: a.l.e on July 03, 2012, 07:39:17 am
hi
nice catch...
can you please fill a bug report?
ciao
a.l.e