[scribus] set TextFrame Distance in Scripter?

Gregory Pittman gpittman at iglou.com
Tue Aug 12 18:44:01 CEST 2008


Pankaj Mittal wrote:
>>
>> Vous (Pankaj Mittal) avez ?crit?:
>>> Hi List
>>>
>>> Is there any api which I can use to set top distance of Text in text 
>>> frame?
>>
>> Hi,
>> I guess that there is not since it?s rather a facility when you 
>> layout by
>> hand. When you use scripter, compute text frame position & size makes 
>> more
>> sense in my opinion. If you need to achieve something that can?t be done
>> without setting up other frame properties I would be very curious to 
>> know
>> about.
>>
>> -- 
>> > If you need to achieve something that can?t be done
>> without setting up other frame properties I would be very curious to 
>> know
>> about.
>>
>
> Hi Pierre
> 1. As a scripter user, I expect api's to do whatever can be done 
> visually (manually). Probably, scripter is not there yet which I 
> understand.
I think this is not quite or not necessarily true. There are things 
which make sense to be done by a script, but others, in which the ease 
and flexibility is far superior in the main interface. So you give the 
tasks to Scripter that can be automated, and keep those tasks out of 
Scripter that you can perform quite easily in Scribus proper.
> 2. Now about my need of setTextFrameDistance(). I am trying to design 
> many cards in which I need to use textFrame (with some corner radius 
> and background color). But the text starts sticks beside the borders. 
> It does not look good because there is no distance between text and 
> borders of textFrame.
>
> I guess we can use a bigger rectangle in the background with corner 
> radius etc. but this increases the dependency on extra object just 
> because one api is missing. I would rather prefer setTextFrameDistance().
For now, this does not exist. You can manually edit after the script 
runs. You could also do a search and replace on the SLA file. Look for 
the PAGEOBJECT variables EXTRA, TEXTRA, BEXTRA, and REXTRA for this 
left, top, bottom, and right distance, respectively. If the distance was 
the same all around, you could just search EXTRA to capture all of them.

Greg




More information about the scribus mailing list