Save As PDF when used in a script, has the option to append the new PDF to an existing PDF file.

Thus, you can use Save As PDF to create a PDF based on the first layout, then your script can switch layouts, set up the data, save as PDF--but append it to the original PDF. This can repeat for each additional layout.

The one limitation that may or may not work for you is that each appended PDF will start on a new page.