Printing method and device