[scribus] Adding text and images to scribus

a.l.e ale.comp_06 at xox.ch
Mon May 4 08:54:41 UTC 2015


hi

> On 05/03/2015 10:19 AM, Darius Blaszyk wrote:
>>   Hi,
>>
>> Is it somehow possible with scribus to add text to a document using
>> python and get the metrics back? I would like to add text to an
>> automatic text frame but I need to know the X and Y position of the last
>> character in the text to do some other layout calculations.
>>
>>
> I don't think there is a way to automatically get a value. One thing 
> to consider is that when you talk about the position of the last 
> character, you might be talking about an edge of the visible part or 
> the edge of the boundary of the glyph.
>
> I workaround may be to create a vertical and horizontal guides, moving 
> them back and forth to the point you're interested in, then check the 
> measurements of the guides.
>
> You might also notice that the mouse cursor shows its X-Pos/Y-Pos 
> coordinates in the bottom bar of the window, if this is precise enough 
> (maybe with zooming in?).

it's even very unlikely that there is such a function! :-)

but work on a high level API (and then a script command) for it would be 
very very welcome!

basically, (afaict) scribus stores and gives easy access to no or very 
little information concerning the current state of "dynamic" elements 
(that is: elements that are not manually placed by the user, like glyphs).
this includes a simple value as the page(s) on which an item is. (that 
was the problem i had to solve...)

as greg wrote, in a script the only way to approximate such a value, is 
to resize the frame and check whas is overflowing at which size.

and as soon as i have some more time, i'll restart my work on a plugin 
API...
(a draft for it being in the epub plugin work on progress you can find 
in my github repository).
once it's setup and running, contributions will be very welcome (well, 
if one wants to contribute the setup, that is also very welcome!)

have a nice day
a.l.e



More information about the scribus mailing list