'Sorting ITextSharp RenderListener Output

I was able to successfully to get pictures and text using Render Listener. However, there are not in the order I want it to be. I tried ordering it by the rectangle class. (Top, Right, Bottom, Left). Nothing worked. Can anyone assist?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source