Hi everyone
I have an Inkscape document containing several pages. I'm using the "Simple Inkscape Scripting" function to run a simple Python code. Here is my question : Is it possible to choose on which page the script will run? THANKS in advance!
But the problem I have is that my inkscape document has several pages and when I run this script it only affects the first page.
I previously downloaded the "Simple Inkscape sitting" extension from GitHub : https://github.com/spakin/SimpInkScr and then installed it. Then I launched the "Simple Inkscape Scripting" extension from Inkscape via Extensions → Render → Simple Inkscape Scripting….
Can you describe what you want to do.
The extension can return page information, bounding boxes etc.
Usually you would use that returned information with some other part of the script ?
Hi thanks for your reply!
The goal of the script is to insert automatically an image at a specific position on the page. It works well. Here it is :
image('/home/admin/Bureau/001.png', (396.9, 924.4), embed=False, transform='scale(1, 1)')
But the problem I have is that my inkscape document has several pages and when I run this script it only affects the first page.
I previously downloaded the "Simple Inkscape sitting" extension from GitHub : https://github.com/spakin/SimpInkScr and then installed it. Then I launched the "Simple Inkscape Scripting" extension from Inkscape via Extensions → Render → Simple Inkscape Scripting….
This seems to work:
all_pages = all_pages()
page_4 = all_pages[3]
page_4_x_offset = page_4.pos[0]
image('image.png', (page_4_x_offset, 0), embed=True)