How to build an online greeting card personalization "function"?
I would be extremely thankful if you could help me out with this. 

Currently I am building a web shop that are going to sell REAL online personalized greeting cards, that we post and print to the recipient. My problem is that I do not know how to build the "text personalization" software, that enables the customer to personalize greeting cards in the front design of the greeting card. With the belonging font to that specific design.

My questions:
What file format should be used when it is personalized? (We have PSD, Adobe InDesign, Illustrator, High res PDF) After it is personalized on our webshop it must be saved into high res PDF in our database, so our printing facility can print it. 
After the greeting card is personalized by our customers, it must also be available for "preview" on the next step.

How can we develop a function that will get the belonging font to be editable on every greeting card design? So the customer can customize/personalize the text.

Here you can see two examples of that very function. If that will be of any help understanding what I am searching for, and how it could be built.
http://www.face-it.me/product/1186/Party-Animals--Birthday-Cousin---Personalised-Cousin-Birthday-Greeting-Card

What is these functions on this sites developed in for languages? Javascript? Html?

http://www.moonpig.com (when you have chosen a design)

Thanks for reading. Once again, I would be very glad if you could help me out with this.

Best,
How to build an online greeting card personalization "function"?
===

I would be extremely thankful if you could help me out with this. 

Currently I am building a web shop that are going to sell REAL online personalized greeting cards, that we post and print to the recipient. My problem is that I do not know how to build the "text personalization" software, that enables the customer to personalize greeting cards in the front design of the greeting card. With the belonging font to that specific design.

My questions:
What file format should be used when it is personalized? (We have PSD, Adobe InDesign, Illustrator, High res PDF) After it is personalized on our webshop it must be saved into high res PDF in our database, so our printing facility can print it. 
After the greeting card is personalized by our customers, it must also be available for "preview" on the next step.

How can we develop a function that will get the belonging font to be editable on every greeting card design? So the customer can customize/personalize the text.

Here you can see two examples of that very function. If that will be of any help understanding what I am searching for, and how it could be built.
http://www.face-it.me/product/1186/Party-Animals--Birthday-Cousin---Personalised-Cousin-Birthday-Greeting-Card

What is these functions on this sites developed in for languages? Javascript? Html?

http://www.moonpig.com (when you have chosen a design)

Thanks for reading. Once again, I would be very glad if you could help me out with this.

Best,