A method and a system for preparing xylan and calcium carbonate, xylan, a cellulose fibre, and precipitated calcium carbonate. The method includes extracting xylan from cellulose fibres with sodium hydroxide to form a mixture containing cellulose fibres and an extract solution containing xylan; removing the cellulose fibres from the mixture to isolate the extract solution; adding carbon dioxide to the isolated extract solution to form a mixture containing a liquid brightener and precipitated xylan; separating the brightener from the mixture to isolate the precipitated xylan; adding calcium hydroxide to the separated brightener to form a mixture of precipitated calcium carbonate and liquid sodium hydroxide; and removing the sodium hydroxide from the mixture to isolate the calcium carbonate.