There are a number of questions from 2017 and 2018 reporting the issue of printing oriented landscape even though all settings are portrait and the print preview shows correctly as portrait in some reports. Examples: Printing page orientation wrong in OS X, Printing page orientation wrong in OS X, Page rotation Wrong on Print (Mac), Incorrect orientation for printing. The reports were for OSX with LO releases early in the 5 series. There was a bug report (https://bugs.documentfoundation.org/show_bug.cgi?id=92190) that verified that the problem had been fixed in versions 5.4.4 and 6.0.0, and requesting that a new case be created if the problem reappeared.
I’ve encountered the problem for the first time, in version 6.1.5.2 in Linux (the version maintained in the MX Linux repo), using LibreOffice Calc.
Symptoms: Page settings are portrait (letter-size). Page break lines on the displayed spreadsheet grid are correctly portrait. Print preview is correctly portrait. Exporting to PDF produces a correct portrait result (which correctly prints as portrait). However, printing the spreadsheet from within LO produces landscape printer output (properly formatted for a landscape page).
The problem occurred with a spreadsheet modified from a previous landscape spreadsheet. I started with an existing landscape spreadsheet, edited it, changed the page settings to portrait, saved it as a new file, and then tried to print the new file. Other existing files already in portrait are not affected (did not test what happens if a portrait file is changed to landscape). Existing portrait files in LO Writer are not affected.
So to be more specific, the problem appears to be that the print format routine does not properly recognize current portrait settings when they have been modified from a landscape-oriented file.