Reputation: 31
Is there a way to include/wrap PDF data generated from a ColdFusion template inside another ColdFusion template, or a cfdocument tag?
I'm working with a system that has generates lots of different reports, some are generated from .CFR templates, others are created by cfdocument/cfdocumentitem tags with HTML inside.
What I need to do is to add a header and a footer to every report, which should look the same everywhere.
My first idea was to create the header+footer as a separate .pdf file, adjust the scale/margins on the existing reports, and then use a DDX and a PageOverlay to merge the report with the header+footer file. However this does not work since ColdFusion does not support PageOverlay.
My second idea was to create a header and footer in HTML, then paste together header+content+footer. This works on the reports that are created from HTML but not on the ones that are created from .CFR templates, because I can't figure out a way to combine HTML code and generated PDF data in the same report. Rewriting all the reports as HTML is not an option.
Any ideas?
Upvotes: 3
Views: 710
Reputation: 1
You could use ColdFusion Report Builder tool itself to generate the above using sub-reporting concept. When you say Also the ColdFusion Report Builder tool helps to set common Header and Footer.
I think the Report Builder standard would be top down (Label & Values). Because it has a set bands for Report Header, Page Header, Column Header, Column Detail, Report Footer.
Upvotes: 0
Reputation: 2895
Which version of CF are you working with? You can now add header and footer to a PDF using CFPDF with addheader/addfooter attribute.
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7995.html
Upvotes: 1