Studio Pro has the capability of generating a paginated invoice, complete with all of the traditional invoice components. Recently, as the first of some new reporting options, I wanted to add the ability to generate an order summary separate from the invoice to make fulfillment easier. Problem is, the invoice generation code is very specific and not at all suited for reuse without a ton of work, which means there’s a real need for a more generic report generation framework in there.
A cursory search on GitHub found only this project, which seems to have been abandoned. Rather than get sucked into spending the time learning and patching a codebase that may or may not match my own needs and model of how it should be done, I decided to create a new one. This is the first of many posts that will serve both as a means for me to think out the design of it and document its progress.
I will be doing this in Objective-C for two reasons: I’m most productive in it and Swift is not well-suited for the approach I’m likely to take.
I’m sure this list will change over time, but for now, here they are:
- Pagination support that can adapt to the paper size provided.
- iOS and OS X support. I don’t need OS X support now, but I have ambitions that stretch there down the road.
- Flexible layouts that allow for differing first, last, and intermediate pages.
- Generic layout components that can be extended in the future for unforeseen needs.
- Background-safe generation of the resulting PDF document.
- Control over when and how page breaks occur, especially if in the middle of an element.