Split image to multiple pages

2

1

I have a large image (80cmx40cm) that I want to print on multiple pages of A4 paper (29,7x21 cm).

Usually I use Gimp as my image processor and I could manually chunk the image, but that would be tedious especially as I will need to do this in semi-regular intervals for other images as well.

How can I either print it directly as one image and let the printer do the splitting?

OR how can I split the image into matching chunks?

I'd prefer a setup in Gimp, but will use any other way (including commandline or online-tool, or whatever).

I plan to tape the paper together then manually. So, if I could do the splitting and printing without having a border on the printout that would be a bonus (if not possible, no problem.)

Angelo Fuchs

Posted 2016-02-27T11:26:25.130

Reputation: 502

Answers

5

If you prefer to get it done online, I may suggest this site - http://rasterbator.net/.

Click in Create Poster and upload your image. Select the page size options, Effect options (I used to select none) and keep clicking continue until you reach the download page. PDF file will automatically download and you can open using evince or any other PDF program that you may have and print them out

Prasanna

Posted 2016-02-27T11:26:25.130

Reputation: 3 554

4

ImageMagick does this pretty well, by easily splitting an image into equal-sized tiles.

First make sure your image is sized properly so that, after it is split into equal sized tiles, each tile is the size of the paper you are printing to (otherwise you'll be doing a lot of trimming.)

For example, pad your image with white pixels. In the 80x40cm case, your image should be padded to 3x29.7=89.1cm width (three A4 lengths) and 2x21=42cm height (2 A4 widths.)

Suppose that's myimage.jpg, and it's going to be 3 pages across and 2 pages down to print. And suppose it's 300dpi, so the total image is 10523x4960 pixels.

Then you can pad and crop in one go:

$ convert myimage.jpg -extent 10523x4960 -crop 3x2@ +repage mytiles.jpg

(For ImageMagick 7 I believe the command is "magick" rather than "convert")

The "-extent 10523x4960" command changes the "border" size of the original image to include the padding (with white, because we didn't set any special background first.) The "-crop 3x2@ +repage" does the tiling (note the "@" symbol!)

If you want the padding spaced equally on both sides add "-gravity center" before the "-extent".

ImageMagick can handle all kinds of image formats, including straight from pdf to pdf (though you may have to fiddle with the dpi options.)

Andrew Kay

Posted 2016-02-27T11:26:25.130

Reputation: 141

Why do I have to resize it to get a "perfect fit"? What happens if I don't? – Angelo Fuchs – 2019-03-19T09:18:20.703

@AngeloFuchs well, the command breaks your image into tiles. So for example if your image is 40cm wide and you split it by width in two, then the tiles will be 20cm wide. So when you print onto A4 paper you'll have to trim them (A4 is 21cm wide.) I guess when I said "resize" in the answer I should have said to pad with unused pixels. – Andrew Kay – 2019-03-20T10:28:37.423

3

The first thing to try would be to look at the printer preferences for your printer, and see if it has a feature to split images for you like that. If the printer driver allows that, that's probably the easiest way to do it.

The next thing to try would be to print to PDF, and have Adobe Reader split it across pages -- assuming you have a print-to-PDF printer driver and have Adobe Reader install.

Finally, those solutions don't work, and this is something you'll do frequently, you might create a script for the task.

One sneaky way to script the task would be to create a spreadsheet with a bunch of text expressions that generate HTML or CSS to show only selected portions of your image, then view each chunk of generated in a web browser, and use the browser's print command to print the selected portion of the image. The Stack Overflow question "How can I display just a portion of an image in HTML/CSS?" offers ways to clip an image.

Steve

Posted 2016-02-27T11:26:25.130

Reputation: 563

There is no adobe reader for linux since ages. I'll look into the other suggestions. Thank you. – Angelo Fuchs – 2016-02-27T12:03:51.540

I guess I'm not surprised you're using Linux, since you're using GIMP. But is there a non-Adobe PDF generator or reader? (I don't use Linux much except for software development.) Also, do you understand the idea of using a spreadsheet as a text script generator without further clarification? – Steve – 2016-02-27T12:13:24.547

I actually tagged the question linux :) -- There are Linux PDF readers. I didn't find a PDF printer that could do the 'crop to multiple pages' thing. I understood what you meant with the spreadsheet thing but I deemed it pretty complicated. So, while I was looking into PDF printers, the other answer came up and solved the issue - I will not go looking into the spreadsheet thing now :) – Angelo Fuchs – 2016-02-27T12:19:55.067

Aha. I should have looked at the tags. Glad you found a PDF solution, that my spreadsheet idea was clear enough, that you didn't need it, and that I didn't go into details when I wrote the answer. – Steve – 2016-02-28T19:24:56.517

3

I'm printing an infographic which is much taller than it is wide and I want to print it across multiple pages in one column. pdfposter works although I am losing a small bit on page margins, I have not found a way to control size of page margins used yet.

Worked for my infographic:

$ pdfposter -p 1x2a4 in.pdf out_down_2_A4_pages.pdf

$ pdfposter -p 1x3a4 in.pdf out_down_3_A4_pages.pdf

e.g. for printing landscape or wide pdfs:

$ pdfposter -p 2x1a4 in.pdf out_across_2_A4_pages_sidebyside.pdf

$ pdfposter -p 3x1a4 in.pdf out_across_3_A4_pages_sidebyside.pdf

e.g. for blowing up:

$ pdfposter -p 2x2a4 in.pdf out_double_size_4_A4_pages.pdf

$ pdfposter -p 3x3a4 in.pdf out_triple_size_9_A4_pages.pdf

http://manpages.ubuntu.com/manpages/trusty/man1/pdfposter.1.html

sudo yum install pdfposter # or apt-get install pdfposter

gaoithe

Posted 2016-02-27T11:26:25.130

Reputation: 423

To control the page margins you might want to have a look at plakativ

– josch – 2019-08-01T05:37:11.713

1

Alternatively, you can use an open source and cross platform command line tool called pdftilecut which takes an arbitrary PDF file and splits it up so they fit inside the page size you specify. For example:

$ pdftilecut -tile-size A4 -in mars.pdf -out mars_a4.pdf

will cut the pages of the mars.pdf into A4 tiles and stores them in mars_a4.pdf.

I'm the author of this tool.

Mansour

Posted 2016-02-27T11:26:25.130

Reputation: 181