Page 1 of 1

creating a multi-page pdf document from layers

Posted: Fri Nov 27, 2015 7:59 am
by witchfindergenerall
I have a document with multiple layers which I need to output so that each layer is a separate page in a pdf. right now I just make one layer visible, save as pdf, then join the pdfs in other software. Problem is: the final document is going to be hundreds of pages long. So, is there a way to export to a multipage pdf where each layer is saved as a separate page, or barring that, export each layer automatically to a series of sequentialy numbered pdfs, which I can then join later? If I can't make either of these solutions work is there a way to change the default 'save as' format so that I don't have to manually find 'pdf' in the drop down format list for each and every save (just to speed up the process a little bit)? Or maybe there's some other work around I haven't considered...
Hopefully I've explained clearly what I'm trying to accomplish.
Thanks.

Re: creating a multi-page pdf document from layers

Posted: Fri Nov 27, 2015 9:02 am
by brynn
Probably you'll need a script to do that. It's definitely possible, as far as I understand. But I don't know anything about writing scripts, so I can't help with that.

There is a way to batch export PNGs. But I haven't heard of a way for PDFs. Hhmm.....although....you know, I might have come across an extension for this. Let me look through my list.

No, I didn't see one. There is an extension for multiple pages support: http://sourceforge.net/projects/inkscape-pages/ I don't know if this is possible, but it would be worth investigating whether this extension could export your layers as separate pages (which I assume are separate SVG files, although I'm only guessing). But you'd still be faced with converting them all to PDF.

You know, it seems like this should be something that a lot of people could use. I'm surprised there's no batch option in the PDF export dialog. Certainly worth a feature request, if it's not already.

Maybe other members will know a way to speed up the job for you. I didn't search the forum, but you could try, while waiting for replies. It seems like I've seen something about this somewhere. I just can't remember where.

Re: creating a multi-page pdf document from layers

Posted: Fri Nov 27, 2015 9:52 am
by Moini
The extension you linked to was created for printing to multipage pdf, so you found the right thing, Brynn ;)
(but from what I heard it sounds as if making a backup first would definitely be recommended)

Re: creating a multi-page pdf document from layers

Posted: Fri Nov 27, 2015 9:59 am
by brynn
Moini wrote:The extension you linked to was created for printing to multipage pdf, so you found the right thing, Brynn ;)
(but from what I heard it sounds as if making a backup first would definitely be recommended)


Oh, I had no idea! I thought it made a multiple page Inkscape document. Good deal then :D

Re: creating a multi-page pdf document from layers

Posted: Fri Nov 27, 2015 2:31 pm
by witchfindergenerall
That looks like exactly what I need! Thanks so much.

Re: creating a multi-page pdf document from layers

Posted: Fri Nov 27, 2015 3:47 pm
by witchfindergenerall
I've had a chance to try the pages extension. It's very slow - not sure if I'll be able to make it work. It's definitely a feature I found useful when I used CorelDRAW years ago.

edit: after having some more time to try the pages extension out I've decided that it won't work for me, even though it is EXACTLY what I need. It's just too slow - about two minutes to go from one page to another. I also read a comment on the dl page by a user whose svg files were eventually becoming corrupted by using this extension, and I don't want to risk having to re-do a lot of work. So that means I'm hoping to resort to the solution of changing the default 'save as' format to 'pdf' As yet I haven't found a way to do this, and don't know if it's even possible.

Re: creating a multi-page pdf document from layers

Posted: Fri Jan 18, 2019 12:12 am
by theozh
Does anybody know if there are alternatives to the link which is also given above?
https://sourceforge.net/projects/inkscape-pages/
If I look at the project page the last update is from November 2015.
Some feedbacks are that it is extremely slow, pages might be missing, original SVG might be corrupted, etc.
So, not very promising and I am hesitating to download, to install and try this at all.
In the meantime, are there any better ideas to print or export the visible layers only to a multipage PDF (each layer a separate page)?

Re: creating a multi-page pdf document from layers

Posted: Fri Jan 18, 2019 8:52 am
by Moini
Use https://gitlab.com/su-v/inx-exportobjects . I don't know if it creates multiple pdfs that you then need to glue together with another program, or if it creates a multipage pdf.

Re: creating a multi-page pdf document from layers

Posted: Fri Jan 18, 2019 9:01 am
by Lazur
Well I'm using pdfsam basic to merge separate pdf-s together -works like a charm.
The other part of the job can be taken care by batch exporting each layer as a separate pdf.

For that I'd tinker with this extension edit:the extension posted by Moini.
It can export to multiple pdf-s selected objects, so it'd take some editing like grouping page contents together or a smart way to select multiple layers only and not their content before running the extension. Sounds doable and fairly good solution in my humble opinion.

Re: creating a multi-page pdf document from layers

Posted: Fri Jan 18, 2019 9:17 am
by Moini
Lazur, that isn't an extension, but a command line script.

Re: creating a multi-page pdf document from layers

Posted: Fri Jan 18, 2019 9:38 am
by brynn
I know of 3 different extensions for multiple page PDF exports. They all seem to work differently, and some of them require installing some extra software.

http://sourceforge.net/projects/inkscape-pages/

https://github.com/wvengen/inkscape-add ... extensions

https://inkscape.org/en/~olibia/%E2%98% ... -extension (https://github.com/olibia/inkscape-multipage-export)

I recently installed one of them, but by looking in my extensions folder, it's not clear which one it was. But I didn't install extra software. I think it was the 3rd one I mentioned above. I found some of it hard to use, but eventually I got my job done.

Re: creating a multi-page pdf document from layers

Posted: Fri Jan 18, 2019 9:42 am
by Lazur
Moini wrote:Lazur, that isn't an extension, but a command line script.


My bad. Probably was about to link to the same extension anyway.
Getting too sleepy at the moment...

Re: creating a multi-page pdf document from layers

Posted: Fri Jan 18, 2019 9:52 am
by Moini
Yeah, for me the last days were really exhausting, too. I'm not sure I'm going to help with the next release...