User:Ssstephen/imposition

From XPUB & Lens-Based wiki
< User:Ssstephen
Revision as of 16:23, 30 October 2022 by Ssstephen (talk | contribs) (Created page with "I just want to print playing cards as an imposed PDF with crop marks why is this so hard. I liked Simon's page where he wrote his process of trying to do something similar, so here is an attempt at a step by step. The aim: Take two source PDFs, one is a multi page document with 70 x 95mm playing cards (front only) and another is an arbitrary sized single page PDF with the artwork for the common back of all the cards. I would like t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

I just want to print playing cards as an imposed PDF with crop marks why is this so hard. I liked Simon's page where he wrote his process of trying to do something similar, so here is an attempt at a step by step.

The aim: Take two source PDFs, one is a multi page document with 70 x 95mm playing cards (front only) and another is an arbitrary sized single page PDF with the artwork for the common back of all the cards. I would like to convert these into a single PDF which is 4-up on an A4 sheet, with crop marks (both documents currently have no crop marks or bleed).

Breaking the process into steps:

Make the front pages

Break the document into individual pages

As per Simon's page, pdftk did a good job of this:

 #burst the source PDF, keep the name of the source plus page number (-%d)
 $ pdftk source.pdf burst output source-%d.pdf

Impose 4up on a page using pdfimpose

But first I need to install pdfimpose on breadcube, which at the moment is getting stuck building a wheel for PyMuPDF, when I $ pip install pdfimpose:

Collecting pdfimpose
  Using cached pdfimpose-2.2.1-py3-none-any.whl (57 kB)
Collecting pymupdf>=1.19
  Using cached PyMuPDF-1.20.2.tar.gz (90.4 MB)
Collecting argdispatch
  Using cached argdispatch-1.2.0-py3-none-any.whl (21 kB)
Collecting xdg
  Using cached xdg-5.1.1-py3-none-any.whl (5.0 kB)
Collecting papersize
  Using cached papersize-1.2.0-py3-none-any.whl (20 kB)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from argdispatch->pdfimpose) (52.0.0)
Building wheels for collected packages: pymupdf
  Building wheel for pymupdf (setup.py) ... /

When it does work what will I need? Crop marks can be added using mark=[‘crop’]. pdfimpose seems to work using schemas, there is already one called cards which is 4-up.

Make the back pages

Resize the document to 70 x 95mm

Image magick can probably do this like below:

#to resize to specific pixel dimensions such as 256x256
$ magick mogrify -resize 256x256 new_source.pdf

Run the same imposition as above

When we get that working. Also the pdfimpose cards schema has an option for back?

Assemble imposed PDFs into a single file

Or not. But could be nice to collate them so the printer can print one doc double sided. Work and turn or tumble? I think the printer in WDKa has the leading edge at the left. Can this be controlled in pdfimpose? From pdfimpose site: "When printing an imposed PDF, it shall be printed two-sided, the binding edge on the left or right."