Forum: Inkscape Single SVG file to multi-page PDF

2cb59b460a7d0e5fdf6a037279395205?d=identicon&s=25 Bats Man (bats)
on 2011-03-01 13:12
(Received via mailing list)
Anyone know how I could layout/hack a single Inkscape SVG file so that I
can get a multi-page PDF out the other end?

Inkscape -> layout tricks (maybe layers?) -> some process (maybe command
line) -> PDF file with pages.

At the moment I am laying-out logos and designs on a single 'page' which
can be as tall as 9000 pixels.

Is there a way to 'chop' a single PDF page like that into smaller
chunks?

\d
9ada0e05a31cce6f4b483d81d80befac?d=identicon&s=25 Matthew Beckler (Guest)
on 2011-03-01 16:21
(Received via mailing list)
Not related to inkscape, but here are the methods I've figured out to
merge and cut up PDF documents with Linux:

1. I've had good luck merging PDF documents together with the pdftk
utility, you can pick and place specific pages, rotate, and do all sorts
of other transformations. ie:

pdftk A=file1.pdf B=file2.pdf C=file3.pdf cat A B1-5 C1R output
output.pdf

2. For splitting a PDF into sub-pages, I've had good luck with using
ghostscript to do that sort of editing. For example, if I want to split
a standard letter size page into two PDFs, I can do something like this:

gs -o "top_half.pdf" -sDEVICE=pdfwrite -g6120x3960 -c "<</PageOffset [0
-400]>> setpagedevice" -f "input.pdf"

gs -o "bottom_half.pdf" -sDEVICE=pdfwrite -g6120x3960 -c "<</PageOffset
[0 0]>> setpagedevice" -f "input.pdf"

To find the dimensions of your page, you can run this command, which
uses the pdf_info.ps file from the ghostscript source code:

gs -dNODISPLAY -q -sFile=input.pdf -dDumpMediaSizes -dDumpFontsUsed
-dShowEmbeddedFonts pdf_info.ps

Look for a line similar to this one:
Page 1 MediaBox: [ 612 792 ]

Then you have to multiply these numbers by 10 to match the units used by
ghostscript.

Hope this helps,
Matthew Beckler
266db0ce3afd700852d3340594a9fd9a?d=identicon&s=25 Ward Poelmans (Guest)
on 2011-03-01 19:20
(Received via mailing list)
On Tue, Mar 1, 2011 at 13:02, donn <donn.ingle@gmail.com> wrote:
> Anyone know how I could layout/hack a single Inkscape SVG file so that I
> can get a multi-page PDF out the other end?

Have a look at
http://wiki.inkscape.org/wiki/index.php/Tools#Mult...

Ward
2cb59b460a7d0e5fdf6a037279395205?d=identicon&s=25 Bats Man (bats)
on 2011-03-02 05:52
(Received via mailing list)
Matthew, thanks a million. You have given me some good clues.

Much obliged,
\d
138a36e6a28129eafc4aaf18b01ff6f3?d=identicon&s=25 heathenx (Guest)
on 2011-03-02 06:36
(Received via mailing list)
Attachment: logos.svg (20 KB)
donn wrote the following on 3/1/2011 7:02 AM:
>
> \d

I was thinking something along the lines of command line parameters,
such as:

inkscape --export-pdf=logo1.pdf --export-id=logo1 --export-id-only
--export-text-to-path logos.svg

...where inside of logos.svg is a logo with various shapes all place
into a single group with the ID
logo1. So if you had 10 logos inside of a master document, you could
assign group IDs to each one
(calling them logo1, logo2, logo3, etc.) You would export each logo to a
separate pdf and then use
something pdf-fy to drill them all into a multi-page pdf file. Of course
a script does this all for you.

However, the above command doesn't work with pdf (or eps or ps). I fail!
:) Although, I can get it
to work with png (I know it's not what you want). Perhaps I'm close.

heathenx

PS. Attached is the logos.svg file that I was playing with.

# png example (single logo example)
inkscape --export-png=logo1.png --export-id=logo1 --export-dpi=300
logos.svg
convert *.png output.pdf
2cb59b460a7d0e5fdf6a037279395205?d=identicon&s=25 Bats Man (bats)
on 2011-03-02 08:46
(Received via mailing list)
On 01/03/2011 15:22, Ward Poelmans wrote:
> Have a look at
http://wiki.inkscape.org/wiki/index.php/Tools#Mult...
Sweet, thanks.
\d
C53fc1a55a7e1d09adda245cf20e9ff0?d=identicon&s=25 Terry Brown (Guest)
on 2011-03-02 09:31
(Received via mailing list)
On Tue, 01 Mar 2011 14:02:01 +0200
donn <donn.ingle@gmail.com> wrote:

> Anyone know how I could layout/hack a single Inkscape SVG file so that I
> can get a multi-page PDF out the other end?

Have you looked at the output from inkscape --help?

--export-pdf=FILENAME combined with --export-id=ID --export-id-only
might do what you want, if the ID is the ID of a layer.

Cheers -Terry
2cb59b460a7d0e5fdf6a037279395205?d=identicon&s=25 Bats Man (bats)
on 2011-03-02 20:17
(Received via mailing list)
On 01/03/2011 19:46, Terry Brown wrote:
> --export-pdf=FILENAME combined with --export-id=ID --export-id-only might do
what you want, if the ID is the ID of a layer.
I read the help and tried all kinds of combinations. It seems to choke
when clones are in the mix. I use clones all the time, so that's a
problem. It also refuses to export to SVG output when there are clones
around.

\d
2cb59b460a7d0e5fdf6a037279395205?d=identicon&s=25 Bats Man (bats)
on 2011-03-02 20:51
(Received via mailing list)
On 01/03/2011 19:00, heathenx wrote:
> I was thinking something along the lines of command line parameters,
>
You read my mind, was thinking this as I went to sleep last night.

Sadly, it seems you are right, the PDF export from the cli is broken.
(My version is 0.47)

I tried:
inkscape -A test.pdf -i "logo001" multipdftest.svg

In the svg file I have two *groups* of id 'logo001' and 'logo002'. Each
has a simple shape in it. No text.
Noticed some things:
1. When there are any clones inside the group -- test.pdf is blank
2. When you remove all clones, the test.pdf shows, but is not placed
fully on the page.

This is very sad, I wonder if there is a bug report for this somewhere.

Anyway, I have to move-along. I will be trying some of the other
suggestions today, but I suspect I will be delivering a single
looooong-scrolling pdf at end of the day.

Thx Heathenx,
\d
B5a7007067c6ba69ca1b0c7d57b2760a?d=identicon&s=25 Ryan Lerch (Guest)
on 2011-03-02 20:51
(Received via mailing list)
>>
>> \d

Fwiw, multipage support in inkscape is long awaited feature request.
Here is the wikipage and the blueprint for some further background.

https://blueprints.launchpad.net/inkscape/+spec/mu...

http://wiki.inkscape.org/wiki/index.php/Multipage

Cheers,
Ryanlerch
1b38956d770238cde7836328b913f819?d=identicon&s=25 Hannes Hochreiner (Guest)
on 2011-03-02 22:14
(Received via mailing list)
On 02/03/11 08:17, donn wrote:
>
> suggestions today, but I suspect I will be delivering a single
> looooong-scrolling pdf at end of the day.
>
> Thx Heathenx,
> \d
>

Hi Donn:

You could try hiding all the elements you don't want on one page and
then export to pdf without selecting an id. This method seemed to work
ok for me, when I used it for the JessyInk export. The export script
works on layers, but since they are really just groups, you should be
able to quite easily modify it for your needs.

Cheers,
Hannes
Ec40aca32377d239fd4d9c9993a551e9?d=identicon&s=25 Cosmin Popescu (cosminadrianpopescu)
on 2011-05-27 07:13
For whoever lands here:

Inkscape now has multiple pages documents:

https://sourceforge.net/projects/inkscape-pages/
Aa8bb03707d6f7d3e1315a4772578be5?d=identicon&s=25 Mark T T (swmo)
on 2014-02-23 21:11
There is a new tool which exports multiple page PDF documents from
Inkscape. You simply define rectangles in Inkscape with a certain ID
where you want the pages to be. It is designed for sewing patterns but
would work for anything.

http://www.titchythreads.com/tools/inkscape_pdf_generator

(Disclaimer: I am the developer).
4a5f1962c0ccb7d95b8f8ff9bf813e74?d=identicon&s=25 Gabriel Grosso (Guest)
on 2014-02-24 00:06
(Received via mailing list)
It isn't FLOSS and doesn't support GNU/Linux. Thanks for your effort,
but i
pass.


2014-02-23 17:11 GMT-03:00 Mark T T <mark@swmo.org>:
C9af522fc39d5de90f21119543c2b9ab?d=identicon&s=25 Steve Litt (Guest)
on 2014-02-24 00:48
(Received via mailing list)
On Sun, 23 Feb 2014 21:11:11 +0100
Mark T T <mark@swmo.org> wrote:

> There is a new tool which exports multiple page PDF documents from
> Inkscape. You simply define rectangles in Inkscape with a certain ID
> where you want the pages to be. It is designed for sewing patterns
> but would work for anything.
>
> http://www.titchythreads.com/tools/inkscape_pdf_generator
>
> (Disclaimer: I am the developer).

Is it just me, or is this post in bad taste and very close to being
spam? This person gets on the Inkscape list and makes one post in the
last two years. That post is for Windows-only, proprietary, commercial
software.

I understand the fact that it's very hard to sell commercial software
these days unless it's a phone app, and appreciate that the poster has
few options that don't cost considerable money and probably not hit his
target audience. I understand that the days of Philippe Kahn making a
compiler in his garage and making a million dollars are gone. The
poster has my sympathy.

But personally, and your mileage may vary, I just don't think it's
appropriate to post a Windows-only proprietary software on a free
software mailing list.

SteveT

Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance
7f6f9e75239bfcc5bfb41014e9dc9a26?d=identicon&s=25 Martin Owens (Guest)
on 2014-02-24 00:53
(Received via mailing list)
On Sun, 2014-02-23 at 18:20 -0500, Steve Litt wrote:
> That post is for Windows-only, proprietary, commercial
> software.

I have no problem with it being commercial, I do however take issue with
it being proprietary and windows only. These aren't just markers of a
lack of quality but a lack of faith and respect for Free Software and
Inkscape as a multi-platform project.

Spam.

Martin,
Ec40aca32377d239fd4d9c9993a551e9?d=identicon&s=25 Cosmin Popescu (cosminadrianpopescu)
on 2014-02-24 08:20
For this kind of things there is posterazor:
http://posterazor.sourceforge.net/

Does exactly the same thing. The only thing missing is the integration
with inkscape. My wife use it all the time exactly for sewing patterns
and it works great. You export your page from inkscape and put it
through posterazor and voilla. You have your sewing pattern.

I too don't have a problem with being commercial, but I do have a
problem with it not being free software and being limited to Windows
(the titchythreads software).
Aa8bb03707d6f7d3e1315a4772578be5?d=identicon&s=25 Mark T T (swmo)
on 2014-02-24 11:40
Okay - sorry that this is considered inappropriate for this list. It is
commercial and Windows only (at the moment) - but I thought that it may
be useful for some users searching for a solution to this problem. I
can't find any stats on it, but I assume that the majority of Inkscape
users do use Windows simply due to its ~70% market share (according to
w3schools)?

It is written using the .net runtimes so it would need to run with Mono,
and so there is some work to do there first. Whether it is worth
investing the time depends on feedback from the Windows version and how
many users need this solution. I'm also not against making this open
source in the future.

It is actually quite different from posterazor, which does not preserve
vector graphics or text into the PDF - nor can it create PDF layers. So
I feel that this tool is filling a useful niche until Inkscape can
support multiple pages.

Anyway, thank you for your time - I won't post again on the subject.
Ec40aca32377d239fd4d9c9993a551e9?d=identicon&s=25 Cosmin Popescu (cosminadrianpopescu)
on 2014-02-24 11:58
@Mark T T

In the web page you are suggesting that the tool is perfect for sewing
patterns, for which you can use posterazor and inkscape without any
problems.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.