Smart printer