Clean up test
Only pass file=NULL if default device is pdf