Custom print headers and footers

I’m trying to make a print-friendly page to display a technical report. I’ve tried FormStack Documents (formerly WebMerge), but with only limited success so far. Because I want the report to include things like photos, rich text, maps, and charts, it seems my best option is to customize Knack rather than integrate it with another platform.

The main thing holding me back from this is that the report needs to contain headers and footers with certain information.

I’ve created a page and layed out my elements as I want them. I’ve inserted page breaks where required using rich text block with some code I picked up in another post.

Now I’m trying to include custom headers and footers. The header should look something like:

{Report Name}

And the footer:

Static Text [then tab stop, right align with right margin]

The challenges, as I see them (though I’m not a developer) are:

  1. {Report Name} would need to be identified from the object that the first view on the page draws from.
  2. could be difficult if the size of the report content changes, though a more simple approach (possibly) could be to count the page breaks, but as I say, I’m no developer.

I’ve found some information about things like Prince XML and wktopdf, but I really don’t know where to start.

Does this sound at all feasible? Can anyone point me in the right direction?

Thanks

Chris

It seems some of my earlier text got cut off. The footer should read:

Static Text [then tab stop, right align with right margin] (pagenumber) of (numberofpages)

Additionally, numbered bullet two should read:

  1. Inserting the number of pages could be difficult if the size of the report content changes, though a more simple approach (possibly) could be to count the page breaks, but as I say, I’m no developer.