I could not reproduce it now but at least in some slightly older version of LibreOffice, it could happen that at the top of the print preview image was displayed "143 mm (A4)" which is silly, as neither side of an A4 paper is 143 mm. Look up the matching paper size from the dimensions displayed. Use the "sloppy" match function to allow for sub-millimeter rounding errors. Change-Id: I6320798061246101c6fc78baf841b71b32b25833 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124612 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>