Advance PDF creation from CRM data

Advance PDF creation from CRM data

I'm trying to create a PDF export of data in the CRM.

My problem is I want a pretty complicated format for the data. I'm trying to export multiple modules worth of data, with nested one-to-many relationships between the modules. Along with that, I want to include attachments from one of the modules in the PDF export.

For example, lets say I want to export Accounts, Contacts, and Cases. For each account, I want to create a PDF file. In that file I want to list all the contacts under that account. Under each contact I want to list any cases they are attached to, and after listing each case I want to insert any pdf attachments that are on that case into this new PDF.

It may look like this:

Page 1
[
      Account information
]
Page 2
[
      Contact 1 information
      Case 1.1 information
      Case 1.2 information
]
Page 3
[
      Case 1.1 Attachment
]
Page 4
[
      Case 1.2 Attachment
]
Page 5
[
      Contact 2 information
      Case 2.1 information
]
Page 6
[
      Case 2.1 Attachment
]
Page 7
[
      Contact 3 information
      Case 3.1 information
]
Page 8
[
      Case 3.1 Attachment
]

All the tools I've found so far are too limited for my use case. I've looked into
  1. Zoho Writer Merge Templates
  2. Zoho Writer PDF Combine API
the main issue being--merge template don't seem to allow iteration + nesting to the degree I'm looking for, and the combine api has a wait time to retrieve the combined PDF and a limit of 5 PDFs to combine at once.

Has anyone accomplished something like this, or have any Zoho tools they know of that would work for this?