3

I have a PDF with 6 pages (let's call dem A-F) in portrait format.

The pages have two different sizes:

  • A,C,D,F: 101.5mm x 215.5mm
  • B,E:9.9mm x 215.5mm (so they are a bit narrower)

Now I want to merge them to two pages (302mm x 215.5mm).

Page 1:
_____________________________
|         |       |         |
|         |       |         |
|    A    |   B   |    C    |
|         |       |         |
|         |       |         |
|_________|_______|_________|
Page 2:
_____________________________
|         |       |         |
|         |       |         |
|    D    |   E   |    F    |
|         |       |         |
|         |       |         |
|_________|_______|_________|

When I try pdfnup I get white borders between the files.

pdfjam --suffix "print" --nup '3x1' --papersize "{302mm,215.5mm}" Dokument-2.pdf

Is there a better way to print multiple pages (with different sizes) on one sheet without resizing the pages?

  • 1
    somewhat related (since pdfjam is a frontend to pdfpages): tex.stackexchange.com/questions/145713/… – myrdd Apr 2 '19 at 16:58
  • @myrdd guess I could have used this instead as it looks more reliable. I'll keep it in mind if I ever need to create a flyer again. – lw1.at Apr 2 '19 at 18:03
1

If anyone else is also looking for an answer:

I now tried to do it with podofoimpose (which is a part of the podofo-tools). My plan is:

inch = 72
mm = inch / 25.4

smallWidth = 99 * mm
largeWidth = 101.5 * mm

PageHeight = 215.5 * mm
PageWidth = 302 * mm

if(PageCount == 6)
then
    i = 1
    newPage = 1
    while newPage <= 2
    do
        x = 0
        while i <= newPage * 3
        do
            -- PushRecord(sourcepage, targetpage, rotation, x, y)
            PushRecord(i, newPage, 0, x, 0)
            print(i, newPage, 0, x, 0)
            if(i == 2 or i == 5)
            then
                x = x + smallWidth
            else
                x = x + largeWidth
            end
            i = i + 1
        end
        newPage = newPage + 1
    end
end

To convert the pdf I now execute:

podofoimpose input.pdf output.pdf plan.lua

It is not perfect (some transparency is not preserved), but it works fine for now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.