I've used the Cairo library through Python. I'm willing to give the code to anyone who's already completed the mission. I don't think there's anything wrong with the code since I can read most of it by mirroring and rotating the image as required. But sometimes text overlaps over other text. In some instances I cannot understand the character:
Problem solved. These were my mistakes:
I did not convert the angle to radians. I thought arc extend meant final angle.