21

I use Google Chrome to view a 1178x5408 .svg file. It includes a lot of small "subgraphics" (screenshots of dialogs, connected by arrows .. think "wizard"), the whole thing is created by graphviz.

Now I want to print it properly. For me it is important to not scale the whole thing down to one piece of paper, since then I can not see anything of the small screenshots anymore.

What are my best options?

6
  • 1
    You may get better responses if you specify what OS you're running. Jul 8, 2010 at 18:45
  • @Doug Harris: no. it is a general problem, i have it under all the OS i am using.
    – akira
    Jul 9, 2010 at 3:27
  • 1
    I meant that if there's a preferred OS, then you'll get OS specific tool recommendations. Also, putting an OS tag onto the question will attract users who have that OS specified as a favorite tag. Jul 9, 2010 at 14:48
  • i can't put enough OS tags on it, i am interested in get the problem solved on all OS :)
    – akira
    Jul 9, 2010 at 18:36
  • 1
    Akira, the solution for one OS will not be the solution for another. We're trying to solve your specific problem, not provide the answers to life, the universe, and everything. Simply adding "I'm using Google Chrome on Windows ME" will suffice and allow us to present a much more accurate solution. Adding that you'd like to know the solution for other OSes as well is OK, but that's secondary to your specific issue and should be treated as such. Sep 24, 2013 at 16:14

11 Answers 11

11

I suggest you use Inkscape to open the SVG file and print it from there. It has far better options on printing than Chrome does for SVG.

Shift + Ctrl + D will get you document options:

Document Options

8
  • 2
    To amplify BloodPhilla, it certainly is puzzling that the SVG format - where "S" stands for Scalable should have a "natural" width and height specified in the <svg> tag. Although Inkscape is a good tool, if desperate you can always open an .svg in your favorite editor and change the dimensions in the opening tag.
    – msw
    Jul 8, 2010 at 14:09
  • 1
    @msw - That would corrupt your SVG image because it would throw of poportions.
    – Pylsa
    Jul 8, 2010 at 14:56
  • good answer, that was one of my approaches as well, didn't worked out so well. inkscape was printing only the first page, iirc. i will check again.
    – akira
    Jul 9, 2010 at 3:32
  • no, it won't, since properties are referenced to the viewport size, not the image's dimension.
    – stevenvh
    Aug 10, 2010 at 15:53
  • 4
    Hiya, could you elaborate any more on what to do within InkScape please? I have a large svg (width="6137pt" height="3092pt") which no mater what I do, either comes out very small on one page, or only prints 1 page of it full size! Cheers.
    – IanVaughan
    Jun 19, 2013 at 10:09
8

Just had to solve this today. I used Inkscape's Print and printed to a PDF file (which is a standard feature on Linux; I don't know about other platforms), and then I used pdfposter to split it into pages:

pdfposter -m a4 -p a3 infile.pdf outfile.pdf

Translation: use A4 pages to build an A3-sized poster.

3

Since most of the answers seemed to focus on command-line solutions, I'd like to add this. And really it goes along with BloodPhilla's answer (Inkscape), because you need to convert the SVG to a PNG first to use this tool, but here it is: PosteRazor. Once you have a PNG, you can feed it into this program and in 4 easy wizard-y steps you get a multi-page PDF that can be assembled into a "poster". I had to play around with margins and overlaps a little bit to get things the way I wanted it, plus you need to be aware of your printer's physical limitation on edge printing, but overall, a worthwhile little tool for this kind of thing.

2

ok, i used wkhtmltopdf to get a reasonable, good looking .pdf from that .svg:

% wkhtmltopdf.exe input.svg output.pdf
2
  • So I've got an SVG with width="2447pt" height="2716pt". wkhtmltopdf gives me two pages: the top left corner and the bottom left corner. The other half of the SVG is just clipped off. Sep 9, 2013 at 13:26
  • @MariusGedminas just pass in --page-width and --page-height in mm
    – dlamblin
    Nov 20, 2013 at 23:39
2

I just had some success with the following steps:

  1. Open the SVG in Inkscape. I'm running version 0.48 for Windows.
  2. Export to a PDF. I used the default settings.
  3. Open the PDF in Foxit Reader.
  4. Print; under the "Print Handling" section, for the dropdown "Scaling Type", pick the option "Tile Large Pages".

Following the above, my SVG seems likely to print on 13 by 10 letter size pages.

Update – I had some difficulty with the above; some of the 'tiled' pages weren't printing, but not always the same pages so I suspect a subtle issue with how Foxit Reader prints tiled pages. Here are alternate steps that I just followed that worked without issue:

  1. Open the SVG in Inkscape.
  2. Export to a PDF.
  3. Open the PDF in Foxit Reader.
  4. Print; under the "Print Handling" section, for the dropdown "Scaling Type", pick the option "Tile Large Pages", and in the Printer ("Name") selection pick "Foxit Reader PDF Printer".
  5. Enter a name for the new PDF that will be created with a page for every 'tiled' page in the original PDF.
  6. The new PDF with the tiled pages should open automatically in Foxit Reader; this PDF can be printed normally and no pages should be skipped.
1

You could try to use the latest version of GhostPDL (sister application to Ghostscript; source code available from http://svn.ghostscript.com/ghostscript) to convert the file to PDF. GhostPDL can handle SVG (and XPS or PCL) in a similar way as Ghostscript does handle PostScript. So here goes the commandline:

gsvg.exe ^
    -dNOPAUSE ^
    -dBATCH ^
    -dSAFER ^
    -sOutputFile=my.pdf ^
    -sDEVICE=pdfwrite ^
    -g1178x5408 ^
    c:/path/to/my.svg

Once you got a PDF, you should be able to print it easily from Acrobat{,Reader}. At least now with PDF we know different ways to reliably print one big-dimension file onto multiple sheets of (letter or A4 or A3) paper using a "posterize" utility.

Maybe such a "poster print" function is also available from Inkscape (which can open and print the SVG directly), but I'm not sure from the top of my head.

4
  • any tricks to embed the referenced .png files into the .pdf?
    – akira
    Jul 12, 2010 at 9:50
  • @akira: Sorry, I do not understand your question. Which .png do you talk about? Jul 13, 2010 at 6:11
  • "It includes a lot of small "subgraphics" (screenshots of dialogs, connected by arrows .. think "wizard")" .. i speak of the .png images which are referenced by the .svg
    – akira
    Jul 13, 2010 at 6:16
  • @akira: you didn't state in your initial question, that the graphics were .png files, and that they were not embedded in the .svg... -- So when you print the .svg to PDF, you do not see the .pngs included in the PDF pages?! What kind of reference is used? Is it internet-based, or local file system-based? Is it using absolute or relative paths? Jul 17, 2010 at 15:43
1

I have same problem with HTML page containing SVG elements.

To print big SVG image contained in HTML file, I use Opera browser and Adobe Acrobat Reader application.

Indeed, on Opera browser, I open contextual menu (right click on page) and then I click on Save as PDF menu.

After SVG image as been saved in PDF file, I open it with Adobe Acrobat Reader application and I activate File\Print menu.

Before printing, I select Affiche Tab (Display in english) to specify how I want to print this SVG image on multiple A4 pages.

print screen of print dialog on Acrobat Reader

In above image, you can see a preview of my SVG contained in 16 pages.

Before printing any SVG image, I recommand to specify correct values for length and width SVG attributes to avoid to print too much empty A4 pages.

<svg xmlns="http://www.w3.org/2000/svg" version="2.0" width="3800px" height="1400px">

Sorry for FRENCH printscreen. I another user with enough reputation have an english version, he can replace my printscreen in adapting page's number.

PS: Save as PDF doesn't work with Firefox nor Chrome browser.

PS: Microsoft Edge allows saving SVG in HTML as PNG or JPEG file. The problem than, is to print PNG or JPEG on multiple pages.

1

If you have access to the original dot file, just convert it to a PDF and then print it with Adobe Acrobat.

Adobe Acrobat has a nice option if you bring up the print dialog from the menu, e.g. File -> Print, then in the dialog click Poster. For Tile Scale use the keyboard up and down keys and look right to see how many pages the image will be printed. Once you like what you see, then just click Print.

1

If you convert your SVG to PDF first, then you can use a tool called plakativ which is able to make a poster that you can print on multiple A4 pages and then glue those pages together to a bigger poster. You can grab it here:

https://pypi.org/project/plakativ/

If you are on Linux you can install it with pip. Windows executables are also regularly built on AppVeyor CI: https://ci.appveyor.com/project/josch/plakativ/build/artifacts

The source code is hosted here: https://gitlab.mister-muffin.de/josch/plakativ

plakativ

0

I had the same problem and opted for using the recommended Inkscape but to subdivide the whole graph into logical independent agrupations and was lucky that each fitted with a reasonably readable font size into A3 sheets.

  1. Select the elements one wants to fit into e.g. A3 and copy them to new document. File / Properties, select A3, portrait or landscape.
  2. Fit the elements together as you wish.
  3. There has to be a shortcut for doing this gradually with the mouse but I did it like this: Select them all, Object / Transformations, Scale tab, "scale proportionally" and try a value. If one fails, Ctrl+Z and try another one.
  4. File / Save copy, type: pdf.

Repeat for each part, one resulting PDF for each section.

Open with some PDF viewer and print.

Otherwise I'd opt for Kenny Evitt solution, but you'll have to .

Can't understand why BloodPhilia answer, as is, is currently the most voted one.

0

I can propose a second solution (= SVG to PDF and print PDF using Acrobat Reader).

I transform SVG file in PNG using following ImageMagick script.

set magick="D:\Program Files\ImageMagick-7.0.10-Q16\magick.exe"
%magick% Plan-Unifilaire.ATHUS.svg Plan-Unifilaire.ATHUS.png

Then I use Microsoft Paint program to print 2400x1300 PNG image on only 2 A4 portrait pages.

enter image description here

I have changed Orientation to Portrait.

I have reducted Right and Left margins to 0

and finally, I have set Adjust to 2 / 1 pages to print image on 2 A4 pages.

Working with Paint has advantage to see Result before Print.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .