If you use the standard PDF button in the Print dialog box, it outputs multiple files, creating a new PDF document for each time the page layout changes. So if you go from portrait to landscape and back, you get three documents. I'd fiddled with various utilities to put them back together with mixed success, but found an even better one button solution...
Click on the Preview button instead of the PDF button. It will generate a single PDF file with the correct page layouts and open it with Preview. Then all you have to do is save the resulting PDF, and you're all set.

