Solution: The problem was that although "HasMorePages" was false, but the "PageVisual" had a null value, so it called the PrintPage again. Fixing the PageVisual value stopped the loop.
Improvement for my code: Used the suggestion by "DNKROZ" to set the HasMorePages to false one instead of on every iteration.