If I understand the API reference correctly, the setPageSize flag tells Acrobat to select the paper based on the page size. That's not exactly what I need to do.
I need to go page by page and choose what to do based on the actual size in the pdf file...
So page 1 is 8 1/2" x 11" setPageSize flag and print it to Letter.
Page 2 is 6 1/2" x 8" use PageHandling.fit to scale it to Letter.
Page 3 is 8 1/2" x 14" setPageSize flag and print it to Legal.
Page 4 is 10" x 16" - ??? I want this to fit to Legal but I don't know how. If I use PageHandling.fit it scales to Letter
A script can't choose the paper size to print to, unless you have different printers for each size, and then you could specify the printer name in each print command. What you're describing will require a much more complicated script, though.