NOVELTY - Processing waste and side flows of pulp and paper industry, involves: a) providing processing arrangement with a separator unit; b) introducing primary slurry into separator; c) dividing slurry by separator into two fractions; d) introducing light mainly organic fraction to biorefinery for producing ethanol or biogas and digestate; e) taking digestate to fertilizer production; f) taking ash to fractionation; g) fractionating ash into coarse fraction lean in heavy metals and fine ash fraction rich in heavy metals; and h) taking fraction in heavy metals for producing fertilizer.    USE - For processing waste and side flows of pulp and paper industry (claimed).    ADVANTAGE - The method bind nitrogen and phosphorus to algae and further on in fertilizer; does not require chemical processing; facilitate fulfilling of emission standards; instead of incinerating the waste and side flows, utilizes the flows efficiently; prevents soil depletion by recovering, among others, phosphorus into a biofertilizer, which reduces the need for chemical fertilizers; provides more effective nutrient cycle (for example, one is able to recover more phosphorus for reuse); reduces the amount of waste for final disposal; produces total energy which is greater than the energy from separate processes; decreases the amount of waste water leaving the process, because ash binds moisture into the fertilizer; may sold organic fertilizer including phosphorus and nitrogen for organic farming; ash replaces the potassium as soil enhancing agent; and spreading both the fertilizer and the soil enhancing agent simultaneously reduces work at farms and the compaction of the soil.    DETAILED DESCRIPTION - Processing waste and side flows of pulp and paper industry, where the waste and side flows comprises at least bark and other wood based waste flows, so called hog fuel, and at least one fibrous waste flow; the processing arrangement of a pulp and/or a paper mill comprises at least a bark boiler for combusting hog fuel a biological wastewater treatment plant and a bio refinery comprising at least fermentation/ethanol production or anaerobic digestion/biogas production, the method being: introducing hog fuel to the bark boiler for producing ash, introducing the fibrous waste flow to a treatment device for dividing the fibrous waste flow to a primary slurry and a first effluent, and introducing the first effluent to the biological wastewater treatment plant, involves: a) providing processing arrangement with a separator unit; b) introducing primary slurry into separator unit; c) dividing primary slurry by separator unit into at least two fractions, i.e. a light mainly organic fraction and at least one heavy mainly inorganic fraction; d) introducing light mainly organic fraction to biorefinery for producing ethanol or biogas and digestate; e) taking digestate from bio refinery to fertilizer production; f) taking ash from bark boiler to fractionation; g) fractionating ash into at least one coarse fraction lean in heavy metals and a fine ash fraction rich in heavy metals; and h) taking coarse ash fraction lean in heavy metals to fertilizer production for producing a fertilizer mixture together with digestate. An INDEPENDENT CLAIM is included for producing a fertilizer, involving: collecting digestate from a biorefinery; treating at least one fibrous waste flows of a pulp and/or paper mill; and collecting an ash fraction lean in heavy metals from a bark boiler of a pulp and/or paper mill.