
Stir together 1-1/2 cups of milk, sugar, salt and vanilla in a saucepan over medium heat. Stir gently to dissolve the sugar and bring to a simmer.
Whisk the cornstarch, egg yolks and remaining 3/4 cup of milk until smooth.
Slowly whisk about 1/3 of the hot milk mixture into the egg mixture, then, pour it all back into the simmering milk.
Continue to stir throughout to prevent the mixture from burning.
Bring to a boil and remove from heat.
Strain the mixture through a sieve.
Add the butter and vanilla. Gently whisk.
Add a piece of plastic wrap directly on top of the surface of the strained mixture. This will prevent a skin from forming on the filling.
Refrigerate for at least an hour.
Preheat oven to 375-degrees.
Roll each of the thawed pastry dough into 11" x 14" rectangles. Place each one on a separate baking tray.
Use a fork to pierce the raw dough, which will allow it to vent and to prevent air pockets and uneven baking.
Place a piece of parchment paper directly over each rolled out dough. Then, place another tray on top of the parchment paper. Do this for both trays with dough. The second tray will weigh down the pastry and prevent it from puffing up during baking.
Bake dough for about 25 minutes or until golden brown.
Remove dough and allow to cool on a baking rack.
Once cooled, gently cut the dough into equal-size rectangles.
Remove filling from the fridge and pipe into a piping bag with a wide piping tip. (I used a Wilton #1M).
Spread a thin layer of raspberry or apricot jam onto each pastry rectangle.
Pipe a line of filling down the middle of the pastry. Alternate small dots of filling and raspberries on the first pastry rectangle. Top it with another pastry raspberry and repeat the filling and raspberry arrangement.
Lightly dust with confectioners sugar. Top with chopped pistachios or almonds to finish it off.
Refrigerate for at least one hour before serving.