I needed to export numerous tabs from a Google sheet and I really did not want to go to each tab individually. So I too sought out a GAS solution. I found this site to be very informative:
It is in Russian but Chrome translated it to English no problem. He does a great job of explaining how he came up with his solution. He did this by setting all the settings in the Print dialog and printed it to a PDF. He then used the Chrome developer tools to capture the URL that did the printing.
My solution was easy, just needed the same range of cells on each tab printed to each own PDF page so I have no help with the custom page size. BUT, if you follow his logic you might be able to figure out what you need to do.
By the way, it looks like you are following the same patterns found here
https://gist.github.com/Spencer-Easton/78f9867a691e549c9c70. I did try that but I found it difficult. When I found the Russion site, it all just seemed to "click" and I understood the "flow of his code". So, give it a shot!
Hope this helps...