Batch PDF creation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Batch PDF creation

Christoph Raab
Dear fellow Inkscapists,

I was wondering if anyone here had a solution for this before I dive into trying to hack something together. The situation is that I have an SVG, where different layers have different languages, and other layers have different graphics. The various combinations of these get exported to in total 9 PDFs, with that number bound to increase. How do I automate that?

Two ideas

1) Does someone have a script that finds a group by its "label", and sets an attribute? (In this case, finds it breadth-first, with the label being the layer name, and setting style=display:none or display:inline.)

2) Is it possible to "include" parts of a document, like in C or LaTeX, but editable and with changes being saved to the individual files?

Best,
Christoph

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Batch PDF creation

Mike Causer-2
On Mon, 31 Jul 2017 10:03:50 +0200
Christoph Raab <[hidden email]> wrote:

> I was wondering if anyone here had a solution for this before I dive
> into trying to hack something together. The situation is that I have
> an SVG, where different layers have different languages, and other
> layers have different graphics. The various combinations of these get
> exported to in total 9 PDFs, with that number bound to increase. How
> do I automate that?

When I needed something similar I wrote an Awk program that read in a
"config" file then switched layers on and off as specified in there and
created a new temporary .inkscape file and exported from that.  The
config file also set options on colours to use for some elements and
where various OS utilities were located because I used this on machines
with different distros of Linux.  

You are welcome to have the program, config and sample inkscape drawing.
It works but I decided that if I ever needed to do it again for a new
project I would use XSLT templates.


Mike

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Batch PDF creation

Maren Hachmann
In reply to this post by Christoph Raab
Hi Christoph,

I don't know about an extension that does /exactly/ this, but here are
links to two extensions that /almost/ do what you want:

https://gitlab.com/su-v/inx-exportobjects (exports pdf, too! Also has a
mechanism to limit export to certain layers and to keep a master layer.
Combine with a CSV file, or write something that parses similar layer
names and you should be done.)

https://github.com/jespino/inkscape-export-layers (allows to mark a
layer that is supposed to be kept fixed by name)

Kind Regards,
 Maren

Am 31.07.2017 um 10:03 schrieb Christoph Raab:

> Dear fellow Inkscapists,
>
> I was wondering if anyone here had a solution for this before I dive
> into trying to hack something together. The situation is that I have an
> SVG, where different layers have different languages, and other layers
> have different graphics. The various combinations of these get exported
> to in total 9 PDFs, with that number bound to increase. How do I
> automate that?
>
> Two ideas
>
> 1) Does someone have a script that finds a group by its "label", and
> sets an attribute? (In this case, finds it breadth-first, with the label
> being the layer name, and setting style=display:none or display:inline.)
>
> 2) Is it possible to "include" parts of a document, like in C or LaTeX,
> but editable and with changes being saved to the individual files?
>
> Best,
> Christoph
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Inkscape-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-user
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Loading...