Sterilize the glass jars and their lids in boiling water. Remove them with pliers and let them drain on a clean cloth.
Peel and free pears and apples from their seeds, and cut them into cubes of similar size. Peel the orange with a potato-peeler and thinly grind the peel with a knife. Alternatively grate the peel with a large mesh grater. Place the zest in a jar, close with a lid and put it in the refrigerator.
Put the fruit cubes in a saucepan, squeeze the orange and grate the previously peeled fresh ginger.
Add the cinnamon and the anise and pour the rice syrup or other liquid sweetener. Bring to a boil over medium heat, close almost completely with the lid (allow the steam to go out) and mix it from time to time with a wooden spoon. Let cook for about one hour over medium heat. You will need to get a dense, slightly gelatinous compound.
When the mixture is ready, add the orange peel, mix well and remove the anise and cinnamon. If you prefer a homogeneous mixture, mix it with a blender.
Pour the mixture into the hot glass jars. If they are not hot you can put them for a few seconds in the microwave (without the lids),or in the oven. Leave about one centimetre between the compote and the top edge of the jar, and close with the lid. Turn the jars over to clear the air bubbles, and let cool down.
For better and longer preservation, immerse the jars completely in a pot filled with boiling water and lined with a cloth (the cloth will prevent the jars from tearing). Bring to the boil and let the cans go under vacuum. Remove from the heat and allow to cool inside the pot, then store in a refrigerator or in a cool, dry place.