fix #36281: custom page margin setting
fix #35616: custom page displays as A4
Merge pull request #1366 from MarcSabatella/36281-custom-page

fixes for custom page size settings