To make the custard; in a small saucepan, heat milk until small bubbles form. Drop in the vanilla pod (or add essence) remove saucepan from heat, and set aside to cool until just warm.
In a medium saucepan, stir together the flour, sugar, salt, and egg yolks. Beat for a moment, then gradually whisk in warm milk. Simmer over medium-low heat until the custard thickens, stirring constantly with a wooden spoon to prevent sticking.
Transfer custard to a bowl, and allow to cool, stirring from time to time.
Preheat oven to 200 degrees C. Roll the puff pastry into a single sheet about 1 cm thick; it should be the same size as a 43x53cm baking tray. Place the pastry onto the baking tray and prick all over with a fork.
Bake in preheated oven until cooked, about 20 minutes. Remove from oven and cool pastry on the baking tray.
When the pastry has cooled completely, transfer it to a hard surface and cut lengthwise into three 10 to 12 cm wide strips.
Spread one strip thickly with custard. Place a second strip directly over the first; spread the top evenly with jam. Cover with the third strip and dust with icing sugar. With a very sharp knife, cut into 8 rectangular portions.