Make the cranberry sauce: put the cranberries, sugar and orange juice in a pan and cook for about 10 minutes, until you get a thick sauce. Add the vanilla. Taste and adjust the sweetness to your liking. Set aside to cool.
Heat the oven to 190°C. Lightly oil a shallow muffin or mini pie tin.
Unroll the pastry and cut out 6-7cm wide squares. Place these into the muffin holes, then sprinkle some sugar in each. Add a teaspoonful of the cool cranberry sauce, then sprinkle again with sugar and scatter some almond flakes on top, if used.
Fold opposite corners of the square together, creating an envelope shape. (They don't need to be sealed).
Bake (in the middle of the oven) for 8-12 minutes, until puffed and golden. Be careful the edges burn easily!
Let them cool on a wire rack, then dust them with icing sugar before serving.