Merge pdfs in a grid

Viewed 664

I have hundreds of pdf files representing cards for a card game. They are standard 2.5"x3.5" files build using LaTeX. In order to print them I want to concatenate them together into a single pdf with 9 cards per page (the most that can fit). Currently I do this using montage -density 300 -tile 3x3 -geometry 750x1050+50+25 a.pdf b.pdf ...

Unfortunately there are a few problems with this solution:

  • Loss of detail -- The -density option is necessary to get decent quality, and the result becomes dependent on desired quality. My printer can print at 600dpi, so I should use -density 600, but some printers won't handle that correctly.

  • Slow -- The other reason I don't use 600 is that even at 300 imagemagick is extremely slow because I think it is converting the pdfs to images, then concatenating them into a pdf.

  • Limited -- Additionally when the number of input files grows sufficiently large, montage will just crash without being able to create the resulting pdf.

  • Loss of perks -- Finally, the resulting pdf doesn't keep the metadata of the originals. Most importantly the text is no longer selectable. This means that I can't search the pdf for a specific card.

In order to fix this I am currently using pdfunite to make a long pdf with 1 card per page, then telling my printer to print 9 on each page. The result is fairly close to the desired effect, however the sizes of the cards are slightly distorted, which is a bit of a problem.

Is there any way to concatenate pdfs in a grid with specific sizes?

0 Answers
Related