Successfully exported PDF with custom settings define in code (Set to not open PDF viewer on export).