Scribus Forums

Scribus => Layout Issues => Topic started by: hibert42 on May 18, 2025, 03:14:45 PM

Title: Copy Size of Object
Post by: hibert42 on May 18, 2025, 03:14:45 PM
Hey,
I am looking for a solution to set the size of an object to that of another.

Example 1:
I have a Text Frame and want it to have the same width as a ceatain Image Frame,
but only the width. Intuitively, I am looking for something like:
copy width from

I know, I can copy the width value and paste it to the Textframe. But maybe there is a script or even a built-in function that already does that.

Example 2:
I want an Image Frame to have the width and height of my page.

And so on and on...

Thanks in advance
Title: Re: Copy Size of Object
Post by: a.l.e on May 18, 2025, 06:17:04 PM
since you seem to be comfortable with scripting, you can write scripts for these tasks.

but for the two examples you're mentioning there are also other solutions.

For example 1 you can:


which one fits better, depends on your habits and on the specific use case.

concerning example 2:


this having been said, in most cases, you don't want to set the size of the image to the exact size of the page but want to fill the bleed area with it: scribus will also snap to it, if you have defined one. (and if you have 1cm bleed, you can set the position to "-1cm" and then set the width to "pagewidth+2cm")
Title: Re: Copy Size of Object
Post by: hibert42 on May 18, 2025, 07:50:18 PM
Yeah I already started ;)
It is a good exercise.

Currently I already can set any frame to the pages size but also to any percentage of the pages size and you can choose if you want width, height or both :)

But i won't stop there.
Going to include the following featurs to make a "Frame Tool" Script.
1. Set size not just to that of Pages, but also other objects via "last selected" or "first selected" method.
2. Set Size of multiple frames
3. Also respositioning, the same as in the alignment tool panel, but here you can just resize and align at the time
4. Also including the Align Image inside Frame from the built-in Script
5. Adding Resize Image inside Frame functionality too ...
Title: Re: Copy Size of Object
Post by: hibert42 on May 19, 2025, 11:09:18 AM
well.... I have to admit, I wrote my rsponse before reading yours.

Item Snapping... I did not know about that.
And I have spent the entire last day writing a script.

Well at least I now have a script to set the a frame to the size of the page + bleeding.

Quotescribus will also snap to it, if you have defined one.
is it?
I tried it and it is not snapping to the bleed extension...



du dumm
Title: Re: Copy Size of Object
Post by: utnik on May 19, 2025, 02:28:37 PM
hi hibert42

Quote from: hibert42 on May 19, 2025, 11:09:18 AM...I tried it and it is not snapping to the bleed extension...
for me it does (in 1.6.4 and 1.7.0) – at least as long as 'snap to guides' is active.

utnik
Title: Re: Copy Size of Object
Post by: hibert42 on May 19, 2025, 09:36:09 PM
Yes it seems to be a little bit inacurate by times.
It works! But Sometimes it doesn't. I zoom a little bit and it works!