Do re-encoding for printing
Use new print function in test script