Print all different size sheets in order

Hello community,

I am working with Dynamo to try to print all the sheets with different sizes in order according to the number, but I have problems trying to match the sheets with the print settings.

This is the cod , any help would be appreciated.

Thanks.

PrintPDF.dyn (34.3 KB)