Wow. You're a hero - this worked perfectly. Just one more thing! I want to open these pdfs with certain settings so I'll add the below, but if you could just show me where to add the pdfOptions in the code.
var pdfOptions= new PDFOpenOptions();
pdfOpenOptions.antiAlias = true;
pdfOpenOptions.mode = DocumentMode.RGB;
pdfOpenOptions.bitsPerChannel = BitsPerChannelType.EIGHT;
pdfOpenOptions.resolution = 300;
pdfOpenOptions.cropPage = CropToType.TRIMBOX;
Thanks!