Scribus > Layout Issues

How to easily add image frame to 100+ pages

(1/2) > >>

I need an image frame added to 106 pages. Each frame will contain a different image. How can I do this without having to manually add an image frame in the exact same spot on each page.

I would create the frame and place it correctly on one page, then send to scrapbook.

Then for each page where the frames is to be added, a double click in in the scrapbook is the only extra action needed in addition to the Get image you would still have to do (since each frame will have a different image).

If the frames were already added, you would still have to select every frame (single click) and do Get image.

But I have to confess I am not sure wheter a frame inserted from the Scrapbook autimatically becomes selected.

Hello - this is a classic problem for which scripter is the solution.

If you think about the repeated actions *as a user* - they go something like this:

* On the current page create an image frame at *some position* with *some size*
* load an image into this frame
* resize the frame and/or image
* create the next page and go to there ready to start again
If you create a new scribus document with one page - then select Script Menu > Show Console and run this (with your image file name):

--- Code: ---# create the image frame .. parameters are x,y,width,height - using the units of your document (mine are mm)
someImageFrame = createImage(10, 10, 100, 100)
# load the image into the frame just created - note the forward slashes for windows (file type can be anything you can do manually)
loadImage('D:/Some/path/to/my/images/processed001.eps', someImageFrame)
# scale the image to the frame size (there are ways to scale the frame to the image
setScaleImageToFrame(scaletoframe=1, proportional=1, name=someImageFrame)
# add a new page (uses default master page if not named)

--- End code ---
That automates all of the user actions listed above. All of the scripter functions are here: Have a look at the definitions of the commands I used in the script - and you should be able to see how they work. For example - click on 'Images' in the left hand menu and the first function listed is 'createImage'

You *could* just create a massive script (in notepad) with that block repeated 106 times - with a different file name each time and paste it into the console - this would work but only really as a one off. What I do is I have a list of the image file names and I get the script to open that list and loop through each file and insert each one - again you can do this directly in the console... but that soon gets hard to manage. If you want to do this more often and potentially add more layout / frames / styling etc you will want to save the script (as '') and execute the script as needed.



hi kylar.merrell

if you need this image frame on all the pages in a range (or all odd or even pages), you may create it on the first page of this range, select it and use 'item' → 'duplicate/transform' → 'multiple duplicate' → 'by page' and select your options…


What version does the "by page" option available?


[0] Message Index

[#] Next page

Go to full version