Hi,
I found a
Stack Overflow post, that described splitting a PDF into multiple pages. I tried this and it worked.
I myself decide which diagrams go in one page, and after I've created a list of such pages(which I create by joining their contents somehow, each page is a diagram), I render each page using renderDia function in the Cairo Monad.
The renderDia function returns a pair, the second part of which is of type Render (). Now I have a list of Render () values, which I intersperse with the showPage function from Graphics.Rendering.Cairo.
Finally, I use the withPDFSurface and renderWith functions to render the list after passing it through sequence_.
Thanks,
Anurag