views:

42

answers:

1

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?

+1  A: 

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

jfrobishow
I am using CF9. CFPDF:s "addheader" only lets me add text with some basic formatting to the header, which is not enough.
Jakob