79075003

Date: 2024-10-10 14:58:12
Score: 1
Natty:
Report link

Old q but for anyone looking, but I made a script for the exact (well, almost - mine creates one file for a printer that does double sided) use case here.

To the point of your second question, you can modify the margins and positioning using pdf-lib if you use embed and draw instead of add and copy. There is an example in my solution (the measurePage function sets margins) and in the documentation here.

(Also a note - as of answering I have to use a "print to pdf" function on my computer as well or the file doesn't print. Just modify the scaling to 100% to keep the programmatically generated margins.)

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Rekha Bhupatiraju