Discussion:
[scribus] How to import SVG files using a script
Tornóci László
2015-06-28 07:24:11 UTC
Permalink
Hi,

I have a bunch of SVG files (actually QR codes produced with an external
tool) that I want to import into my scribus document. It works perfectly
well manually. However, it is very boring and error prone to do it that
way (select the proper page, proper SVG file, position it, scale it for
every page). How can I do this using a script?

Laszlo

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
JLuc
2015-06-28 07:48:33 UTC
Permalink
I have a bunch of SVG files (actually QR codes produced with an external tool) that I want to import into my scribus
document. It works perfectly well manually. However, it is very boring and error prone to do it that way (select the
proper page, proper SVG file, position it, scale it for every page). How can I do this using a script?
Simple : it requires you to find a script that does it, or to write it,
and last to use it.

I advise you to start with the 1st step : search scripts on the wiki.

JLuc


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Tornóci László
2015-06-28 11:30:05 UTC
Permalink
Hi,
Post by JLuc
Post by Tornóci László
I have a bunch of SVG files (actually QR codes produced with an
external tool) that I want to import into my scribus
document. It works perfectly well manually. However, it is very boring
and error prone to do it that way (select the
proper page, proper SVG file, position it, scale it for every page).
How can I do this using a script?
Simple : it requires you to find a script that does it, or to write it,
and last to use it.
I advise you to start with the 1st step : search scripts on the wiki.
Thanks for the advice, but of course, I've done it already, with no
luck. That's why I ask. An undocumented importSVG function is mentioned
here:

http://wiki.scribus.net/canvas/Making_a_Pie_Chart

but I get an error trying to use that (in scribus 1.4.5). There are lots
of things you can do with scripts, but I am not even sure importing SVG
files is supported at this time.

Laszlo
Post by JLuc
JLuc
___
http://lists.scribus.net/mailman/listinfo/scribus
http://wiki.scribus.net
http://forums.scribus.net
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Tornóci László
2015-06-28 14:19:07 UTC
Permalink
Hi,

On 06/28/2015 01:30 PM, Tornóci László wrote:
...
Post by Tornóci László
Thanks for the advice, but of course, I've done it already, with no
luck. That's why I ask. An undocumented importSVG function is mentioned
http://wiki.scribus.net/canvas/Making_a_Pie_Chart
but I get an error trying to use that (in scribus 1.4.5). There are lots
of things you can do with scripts, but I am not even sure importing SVG
files is supported at this time.
I've found the correct way in the meantime.

placeSVG(SVGFileName, posX, posY)

works fine in python scripts for scribus 1.4.5

Laszlo


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
José Antonio Rocha
2015-06-28 16:03:40 UTC
Permalink
2015-06-28 4:24 GMT-03:00 Tornóci László <
Post by Tornóci László
I have a bunch of SVG files (actually QR codes produced with an external
tool) that I want to import into my scribus document. It works perfectly
well manually. However, it is very boring and error prone to do it that way
(select the proper page, proper SVG file, position it, scale it for every
page). How can I do this using a script?
​FUNCTION:
placeSVG

SYNTAX:
placeSVG("filename", x, y)

Places the SVG "filename" onto the current page, x and y specify the
coordinate of the topleft corner of the SVG placed on the page

If loading was successful, the selection contains the imported SVG

--
[image: Meira]
------------------------------
nome: "José Antonio Meira da Rocha
<https://plus.google.com/+JoséAntonioMeiradaRocha/>"
email: ***@gmail.com
veículo: [ http://meiradarocha.jor.br ]
fones: [ 55-8448-3866 55-3744-2994 ]
------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20150628/b0eb5969/attachment.html>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://w
Loading...