Both, the name that you read from the card and the name that's printed on the card are infact the same. The printed name is typically printed {FIRST NAME}{SPACE}{LAST NAME} whereas the card holder name field in the card's data structures (e.g. mag-stripe track data) is always encoded as {LAST NAME}/{FIRST NAME}. So to get the name printed on the card you can simply split the string at the "/" (slash) to get the first name and last name fields. You can then re-arrange those fields in whatever form you need.
Btw. note that all major brands committed to removing the name information from the data structures readable through the contactless interface. Thus, with future cards, reading the card holder's name through NFC will not be possible any more.