Print PDF scaled-down and aligned

116

Ok, got it. The key to success is to explicitly specify paper size.

For example, if the original PDF has DIN A4 page size, then

pdfjam --a4paper --scale 0.5 --offset "-7cm 0cm" -- inputfiles

does the trick. I'm not sure why -x with x<10 didn't work before.

Share:
116

Related videos on Youtube

Tom Balou
Author by

Tom Balou

Updated on September 18, 2022

Comments

  • Tom Balou
    Tom Balou over 1 year

    I'm currently working on a website containing two folders at root

      .root
         ./backoffice
    
         ./frontoffice
    

    Those two folders are different but need to be on the same level, so they can be accessed directly from the root of the web site (www.mywebsite.com/backoffice or www.mywebsite.com/frontoffice)

    I would like to push them to the same git repository, by doing so

    • creating a repository mywebsite
    • initiating git in this reposity
    • adding the repositories /backoffice and /frontoffice in this repository
    • pushing everything to my git repo

    The problem is that if I make a clone of this repo, I'll get a folder named mywebsite, which contains the two folders I wanted. And I would like having directly my two folders where I decide to do the git clone, how is this possible please ?

    Thanks for caring ;)

    • vinc17
      vinc17 almost 10 years
      Negative pdfjam offset works for me. There may be something special about your PDF file or you did something wrong.
    • dom0
      dom0 almost 10 years
      very strange, --offset "-5cm 0cm" does nothing, -9.5m 0cm does nothing either, but -10cm 0cm —— BANG 10 cm offset. what the hell? also: the content is then off-page. I think I need to change the paper size or something like that?
    • TheBeginner
      TheBeginner almost 10 years
      What page size is the file? Providing a example file may also help.
    • dom0
      dom0 almost 10 years
      The original page size is A4 (din a4) and I also want to print it on A4. So for testing purposes any A4 pdf file will work, really. Or actually any standard-sized pdf, given I want to print pdf with $pagesize out with $pagesize, just transformed like described: scaled down, and aligned to the left.
  • dom0
    dom0 almost 6 years
    I believe the offsets not working might have been due to automatic margin-trimming being enabled in my PDF reader (e.g. in Okular View->Trim View->[x] Trim Margins).
  • young_souvlaki
    young_souvlaki almost 4 years
    Where did you find documentation on this? I can't find this answer by searching for scaling pdf on linux command line.