Include a ColdFusion report template in another ColdFusion report template

Is there a way to include / migrate PDF data created from a ColdFusion template inside another ColdFusion template, or a cfdocument tag?

I work with a system that generates many different reports, some of them are created from .CFR templates, others are created using cfdocument / cfdocumentitem tags with HTML inside.

What I need to do is add a header and footer to each report, which should look the same everywhere.

My first idea was to create header + footer as a separate .pdf file, adjust the scale / fields in existing reports, and then use DDX and PageOverlay to combine the report with the header + footer file. However, this will not work because ColdFusion does not support PageOverlay.

My second idea was to create a header and footer in HTML and then insert header + content + footer. This works with reports created from HTML, but not with reports created from .CFR templates, because I cannot find a way to combine HTML code and generated PDF data in the same report. Rewriting all reports as HTML is not an option.

Any ideas?

+3
source share
1 answer

What version of CF are you working with? You can now add headers and footers to PDF using CFPDF with the addheader / addfooter attribute.

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7995.html

+1
source

Source: https://habr.com/ru/post/1764140/


All Articles