Roll up the puff pastry on the baking sheet lined with baking paper, peel off the paper and roll up the edges about 1 cm high, score the corners.
Now spread the cream cheese on, then sprinkle the diced ham, the onion cut into half rings and finally the grated cheese. Season with a little freshly ground black pepper from the mill and put in the preheated oven.
Bake for about 20 minutes at 180 degrees, depending on the oven, of course.