Printing tabs in calc using a script

I have a calc workbook with many tabs, I want to set up a script to custom print with 1x8 pages, borders around each page and a .2" margin. Can I do this with a script?

I don’t want to select all tabs and print because when I do the 1x8 pages they get printed together, I want the script to print each tab into their own file

File??? Do you want to export the Sheets to PDF files?

Yes, I want each tab to be exported to it’s own pdf file with print conditions

You might come close by

  1. selecting multiple tabs for the formatting part (1x8, margins, and border)
  2. go back to each sheet separately and put a space in the bottom right cell by the last dashed-line page indicators to fill out the border for the last page
  3. Then look at OO Macros Explained Section 13.15.2, and loop over the sheets rather than just using getActivesheet(), using a scale near 100%