You are not logged in.

#1 2024-06-25 13:10:54

musketdipper
Member
Registered: 2024-06-25
Posts: 1

pdfjam generates US Letter PDF even though A4 was specified

I am trying to stack 4 copies of the same A6 PDF to create one A4 pdf. I used pdfjam from the texlive-binextra package.

> pdfjam --nup 2x2 a6.pdf a6.pdf a6.pdf a6.pdf --noautoscale true --paper a4paper --outfile a4.pdf
          ----
  pdfjam: This is pdfjam version 3.10.
  pdfjam: Reading any site-wide or user-specific defaults...
          (none found)
  pdfjam: Effective call for this run of pdfjam:
          /usr/bin/pdfjam --nup '2x2' --noautoscale 'true' --paper a4paper --outfile a4.pdf -- a6.pdf - a6.pdf - a6.pdf - a6.pdf - 
  pdfjam: Calling /usr/bin/pdflatex...
  pdfjam: Finished.  Output was written to 'a4.pdf'.

a4.pdf looked fine, except the top and bottom was a bit cut out. Then I noticed that the output was US Letter and not A4. So I changed pdftex's default paper size to A4.

> sudo tlmgr paper a4
tlmgr: setting paper size for context to A4: /etc/texmf/tex/context/user/context-papersize.tex
tlmgr: setting paper size for dvipdfmx to a4: /etc/texmf/dvipdfmx/dvipdfmx.cfg
tlmgr: setting paper size for dvips to a4: /etc/texmf/dvips/config/config.ps
tlmgr: setting paper size for pdftex to a4: /etc/texmf/tex/generic/tex-ini-files/pdftexconfig.tex
tlmgr: setting paper size for psutils to a4: /etc/texmf/psutils/paper.cfg
tlmgr: setting paper size for xdvi to a4: /etc/texmf/xdvi/XDvi
running mktexlsr ...
done running mktexlsr.
Regenerating existing formats, this may take some time ...running fmtutil-sys --refresh --all --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/0123456789/0123456789 ...
  OK: euptex.fmt/euptex tex.fmt/tex luajithbtex.fmt/luajithbtex xetex.fmt/xetex luajittex.fmt/luajittex aleph.fmt/aleph luahbtex.fmt/luahbtex pdftex.fmt/pdftex luatex.fmt/luatex hitex.fmt/hitex amstex.fmt/pdftex ptex.fmt/euptex lollipop.fmt/tex xelatex-dev.fmt/xetex uplatex-dev.fmt/euptex luacsplain.fmt/luatex mptopdf.fmt/pdftex pdflatex-dev.fmt/pdftex utf8mex.fmt/pdftex csplain.fmt/pdftex pdfetex.fmt/pdftex texsis.fmt/pdftex dviluatex.fmt/luatex mllatex.fmt/pdftex lualatex-dev.fmt/luahbtex mf.fmt/mf-nowin latex-dev.fmt/pdftex pdfcsplain.fmt/pdftex pdfcsplain.fmt/luatex pdfcsplain.fmt/xetex jadetex.fmt/pdftex platex-dev.fmt/euptex pdfmex.fmt/pdftex dvilualatex-dev.fmt/luatex hilatex.fmt/hitex uptex.fmt/euptex platex.fmt/euptex mex.fmt/pdftex pdfjadetex.fmt/pdftex dvilualatex.fmt/luatex optex.fmt/luatex etex.fmt/pdftex pdfxmltex.fmt/pdftex xmltex.fmt/pdftex eptex.fmt/euptex eplain.fmt/pdftex latex.fmt/pdftex pdflatex.fmt/pdftex uplatex.fmt/euptex lualatex.fmt/luahbtex mltex.fmt/pdftex cont-en.fmt/pdftex cont-en.fmt/xetex xelatex.fmt/xetex
done
tlmgr: package log updated: /var/lib/texmf/web2c/tlmgr.log
tlmgr: command log updated: /var/lib/texmf/web2c/tlmgr-commands.log

Then I ran pdfjam again.

> pdfjam --nup 2x2 a6.pdf a6.pdf a6.pdf a6.pdf --noautoscale true --paper a4paper --outfile a4.pdf
          ----
  pdfjam: This is pdfjam version 3.10.
  pdfjam: Reading any site-wide or user-specific defaults...
          (none found)
  pdfjam: Effective call for this run of pdfjam:
          /usr/bin/pdfjam --nup '2x2' --noautoscale 'true' --paper a4paper --outfile a4.pdf -- a6.pdf - a6.pdf - a6.pdf - a6.pdf - 
  pdfjam: Calling /usr/bin/pdflatex...
  pdfjam: Finished.  Output was written to 'a4.pdf'.

I still got a US Letter PDF. Only when I manually edited /etc/locale.conf and regenerated the locales did I get an A4 PDF. Originally /etc/locale.conf had only one line LANG=en_US.UTF-8 but I added LC_PAPER=en_UK.UTF-8.

The reason I specified a4 in my pdfjam command was because I didn't want to edit my locale just for one job, but I had to anyway. Why was the parameter ignored?

Offline

Board footer

Powered by FluxBB