Separate printing DOM function