The pulp and paper industry uses significant amounts of water and energy for the paper production process. Closing the water cycles in this industry, therefore, promises large benefits for the environment and has the potential of huge cost savings for the industry. Closing the water cycle on the other hand also introduces problems with process water quality, quality of the end-product and scaling, owing to increased water contamination. An inline treatment system is discussed in which anaerobic-aerobic bio-reactors perform a central role for removing both organic and inorganic pollutants from the process water cycle. In the proposed set-up, the organic compounds are converted to methane gas and reused for energy supply, while sulphur compounds are stripped from the process cycle and calcium carbonate is removed by precipitation. Improved control of the treatment system will direct the inorganic precipitates to a location where it does not adversely affect paper production and process water treatment. A simulation program for triggering and controlling CaCO3 precipitation was developed that takes both biological conversions and all relevant chemical equilibria in the system into account. Simulation results are in good agreement with data gathered in a full-scale "zero-emission" paper plant and indicate that control of CaCO3 precipitation can be improved, e.g. in the aerobic post-treatment. Alternatively, a separate precipitation unit could be considered.