Topic: Ideas Welcome

I Have an application that I am working on that I need ideas.

Here is the thing I am trying to do:  1) Take an item from the database (Case A) and produce a PDF report from that .

I have been able to do that with it hard coded for just "Case A" but being able to have the choices for B to Z and beyond are proving to be a bit tricky. The templates for the various cases are diffrent depending on the case that is chosen (diffrent things pulling from the Db to make the PDF). Also the client would like to be able to edit the templates on a user basis.

Any ideas on how to go about this would be appreciated.

Thanks

Re: Ideas Welcome

Hi,

Have you checked out using http://prawn.majesticseacreature.com/ and http://www.cracklabs.com/prawnto? They should make it easier to generate dynamic PDFs.

Kevin

Re: Ideas Welcome

Already using Prawn to do the PDF's - it works "hard coded" (just a single case) but I am trying to do it dynamically pulling from the Db for each case.

Re: Ideas Welcome

Hi,

Not exactly sure what you mean by "hard coded". Can you clarify?

If you are using Prawn with view support, you should be able to use all logic control flow (loops, conditionals, etc.) to render whatever elements of a PDF are desired for a certain case...

Kevin