Dynamic rtf from template and database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tonymanuel
    New Member
    • Jul 2008
    • 4

    Dynamic rtf from template and database

    Hi everyone,

    I'm having a problem and I think you can help...

    I have a rtf template with some keywords inside. The idea is read the data from a database and replace the keywords with real data. When the keywords represent vars is an easy job, just replace them. But when I need to create tables with dynamic content (read from database, for example a list of customers) the problem starts. First, I need to search for the keyword representing a list (or a loop) and check what is the formatting applied to the cells, then get the data from database and print, but I don't know how to do this... Please, help me

    Thanks in advance
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, Tony.

    You might have some success using PhpRtf (http://www.phprtf.com/) or else you might want to consider creating a PDF instead (http://www.hudzilla.org/phpbook/read.php/11_4_2).

    Comment

    • tonymanuel
      New Member
      • Jul 2008
      • 4

      #3
      Originally posted by pbmods
      Heya, Tony.

      You might have some success using PhpRtf (http://www.phprtf.com/) or else you might want to consider creating a PDF instead (http://www.hudzilla.org/phpbook/read.php/11_4_2).
      Thanks pbmods.
      However, that library allows to create rtf from "scratch". In my case, I have a rtf template with some keywords or tags inside and I need to replace those keywords with real data from database.

      Comment

      Working...