## quarta-feira, 2 de junho de 2010

### pdfposter

Go to official pdfposter website here.

This tool is very simple and good. You can split a PDF document into several to create a poster. See the example bellow:

pdfposter -p 4x4a4 /tmp/drawing.pdf /tmp/out.pdf

input: 1 page, A0, pdf file:
drawing.pdf

output: 16 pages, A4, pdf file:
out.pdf

But there is a problem... printers usually have a printable area, so you need to add a margin to your document in order to don't lose anything when you print it. Here is how I did it for the example above.

First, use pdfposter to create a smaller version (160x247mm, that means 2.5mm of top, bottom, left and right margins).

pdfposter -m160x247mm -pA0 drawing.pdf out.pdf

After that, create a TeX document that will include this pdf, place each page inside a A4 page and include cropping marks. Here is the source code:

\documentclass{article}% Support for PDF inclusion \usepackage[final]{pdfpages}% Support for PDF scaling\usepackage{graphicx}\usepackage[dvips=false,pdftex=false,vtex=false]{geometry}\geometry{   paperwidth=160mm,   paperheight=247mm,   margin=2.5mm,   top=2.5mm,   bottom=2.5mm,   left=2.5mm,   right=2.5mm,   nohead}\usepackage[cam,a4,center,dvips]{crop}\begin{document}% Globals: include all pages, don't auto scale\includepdf[pages=-,pagecommand={\thispagestyle{plain}}]{/tmp/out.pdf}\end{document}

And... voilà! Here is the final pdf. And it page will be like this:

#### 3 comentários:

1. Very useful, thanks for sharing! :)

2. Perfect, exactly what I was looking for. I am wondering why pdfposter doesn't include printing margins in the first place (what's the purpose otherwise?), but this procedure saves this otherwise useless python script.

3. There is an overlap_option.patch contained in
https://build.opensuse.org/package/files?package=pdfposter&project=devel:languages:python

This patch addresses exactly this issue by adding an overlap margin on the PDF pages. E.g. -O 5 gives an overlap of 5 percent.

The latex solution looks much nicer, but I wanted to have a solution inside pdfposter itself.