pdf schematic shifted to the right

Description

I’m using kicad 5.1.6 on FreeBSD. For some time now I’ve found when I save an A4 format schematic as pdf and print it the right side is clipped.

Steps to reproduce

Today I happened to download and print an A4 schematic someone else created and it printed without clipping. When I compared it with one of mine I see it was created with 5.1.2 and that my schematic is shifted about 7.5mm to the right. If I shift the two pages I see that the borders and title box all line up.

Here is a pdf I generated by starting a new project and using the "print to file" option. The shift can easily be seen with a random pdf viewer (I use xpdf).

KiCad Version

Application: KiCad
Version: 5.1.6, release build
Libraries:
    wxWidgets 3.0.5
    libcurl/7.70.0 OpenSSL/1.1.1g zlib/1.2.11 nghttp2/1.40.0
Platform: FreeBSD 11.3-RELEASE-p9 amd64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.72.0
    OpenCASCADE Technology: 7.4.0
    Curl: 7.70.0
    Compiler: Clang 8.0.0 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=OFF
    KICAD_USE_OCC=ON
    KICAD_SPICE=ON