Hello Hilary,
Is there a way for your to share this project because I'm not able to get pass MainDataSource at all and I've tried to include all the dll that I know of. My version of infopath is 2013 and I'm using VS2012 and VS2017..nothing seems to works. My basic requirement is to print InfoPath form to PDF. Thanks ...