Extend callback function to support print customization.