Scribusoid

Author Topic: Fully justifying a text box using Scripter  (Read 2250 times)

apastuszak

  • Jr. Member
  • **
  • Posts: 56
  • Karma: 0
Fully justifying a text box using Scripter
« 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.

apastuszak

  • Jr. Member
  • **
  • Posts: 56
  • Karma: 0
Re: Fully justifying a text box using Scripter
« Reply #1 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.

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1993
  • Karma: 26
    • the graphics lab
Re: Fully justifying a text box using Scripter
« Reply #2 on: July 03, 2012, 07:39:17 am »
hi
nice catch...
can you please fill a bug report?
ciao
a.l.e