You can also replace the flavorings with vanilla for example or omit the ones you don't like or don't have.
PROCEDURE
Peel the pears and slice or cut them into chunks. Place them in a saucepan with the sugars, butter cut into chunks, lemon juice, grated peel, cloves and cinnamon. Cook for about 10 minutes, stirring occasionally, until the pulp is well cooked, almost like a puree. Mash with the prongs of a fork to obtain it. Leave to cool. I obtained 800 g of pear puree. Remember to remove the cloves and star anise if you used them.
Add the eggs, mixing, and the sifted powders, combining well with a spatula.
Butter a 24 cm cake tin (if smaller it will be taller) and sprinkle with flour.
Pour the mixture into the mold.
Cook at 170°, in a preheated oven, for about 45 minutes.
Optionally, you can sprinkle it with icing sugar once it has cooled. If you want to decorate it as in the photo, just place 2 slices of pear on the surface and 2 leaves (washed and dried) before sprinkling the icing sugar.