Dove prisms suffer from angle and shift errors due to inevitable errors in manufacturing and installation, limiting their applicability in tasks requiring high-precision scanning. These errors, particularly angle errors, can significantly deform and ruin the intended scanning trajectory. Here, we propose a method for compensating the angle errors in Dove prisms using galvanometers. The method first determines the angle error by analyzing the distorted scanning trajectory. Subsequently, by synchronizing the galvanometers with the Dove prism rotation, the galvanometers dynamically correct the angle error at each rotation angle. This approach eliminates the need for complex mechanical adjustment mechanisms and offers a convenient calibration process. Our experiments demonstrate that the angle error can be adjusted to be below 17 µrad under the described conditions. By enabling high-precision scanning, this method has the potential to broaden the application scenarios of Dove prisms in various fields.