Skip to main content
Inspiring
April 30, 2015
Question

Printing (and formatting) content in CF11

  • April 30, 2015
  • 1 reply
  • 704 views

Hi

I have a client that needs to collect data from a standard HTML form, stuff the data in a database and then query and format the data for printing.

The printed result has some fairly stringent requirements which I can likely do with CSS (such as field widths, line breaks, etc.).

My question is, has anyone identified a good way to do this? How does the CF world handle printing dynamic data into a pre-formatted form?

Thanks in advance,

Rich

This topic has been closed for replies.

1 reply

Inspiring
April 30, 2015

...ugh, of course I've already built the forms, queries, etc in Coldfusion. So the data is ready to be queried from the DB and formatted for output.

;-)

Inspiring
May 1, 2015

What kind of file are you looking to end up with to print? pdf, doc, html, txt?

Have you tired anything yet or looked at cfdocument - ColdFusion, English documentation - Adobe Learning Resources ?

Inspiring
May 1, 2015

HI haxtbh

... so far I have simply built out a careful .cfm page using a combination of tables, divs and spans to duplicate the necessary final look of the duplicated form.

Effectively the form I'm duplicating is simply a pdf form that is usually printed and filled out by hand; I created a web form that collects the requested data so that my client can select the record, view the page with the required data and print it.

The final format doesn't matter, it's all about being able to print out the final form in the exact condition with the query based data. I've used cfdocument before to build and print content before but I'm still faced with the task of formatting the lines of text in the form to display/print as needed....  I keep thinking there's got to be a better way....

Thanks,

Rich