api for printing