A printer for printing packaging associated with a pharmaceutical product. The printer determines visible information to be provided on the packaging and an identity associated with the pharmaceutical product. The printer uses this to generate coded data including a number of coded data portions, each coded data portion being indicative of the identity. The printer then prints the packaging by printing the coded data and the visible information.