Single SVG file to multi-page PDF
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
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
On 03/01/2011 07:02 AM, donn 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?
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
Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
On Tue, Mar 1, 2011 at 13:02, donn <donn.ingle@...155...> 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#Multipage_presentation_or_book
Ward
On 01/03/2011 15:22, Ward Poelmans wrote:
Have a look at http://wiki.inkscape.org/wiki/index.php/Tools#Multipage_presentation_or_book
Sweet, thanks. \d
donn wrote the following on 3/1/2011 7:02 AM:
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
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
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
On 02/03/11 08:17, donn wrote:
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:
- When there are any clones inside the group -- test.pdf is blank
- 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
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
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
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/multiple-pages-support
http://wiki.inkscape.org/wiki/index.php/Multipage
Cheers, Ryanlerch
On Tue, 01 Mar 2011 14:02:01 +0200 donn <donn.ingle@...155...> 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
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
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).
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@...3065...>:
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).
-- Posted via http://www.ruby-forum.com/.
Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.cl... _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
On Sun, 23 Feb 2014 21:11:11 +0100 Mark T T <mark@...3065...> 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
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,
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.
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.
@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.
participants (12)
-
Cosmin Popescu
-
donn
-
Gabriel Grosso
-
Hannes Hochreiner
-
heathenx
-
Mark T T
-
Martin Owens
-
Matthew Beckler
-
Ryan Lerch
-
Steve Litt
-
Terry Brown
-
Ward Poelmans