Print and Print Preview Not Working Properly

I have a writer document with what I believe are several sections. This is so the page size can vary from portrait to landscape. They look fine in normal view and in print preview. When I try to print, the landscape pages are printed portrait and so are cut off.

There’s also an oddity in print preview mode, where I can’t always see all the pages. If I press the END key, it shows me the last page. If I press the arrow keys, I see any page I want. But if I use the scroll bar, I can’t see the last two pages. It reports showing page 32 38/40, which is correct. I can’t see the last two pages unless I use the arrow keys to scroll up at least one page, which then shows page 33 39/40 then down to page 34 40/40.

I have no idea if this is related.

I’m using Foxit Reader PDF Printer. I get the same behavior when I select Microsoft Print to PDF as the printer.

I did finally figure out I could generate a proper PDF file by using File/Export As/Export as PDF

What is wrong with the print preview function?

Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 16; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL