Announcement

Collapse
No announcement yet.

Creating Documents

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating Documents

    Hello
    I am a novice in programming. I would like to know if it is possible to send data from scriptcase to a MSword template and how I go about doing that.
    Thanks

  • #2
    The best way is to use docx or rtf as basis for a template. In general the docs need to be generated on the server. So you need to generate a docx or rtf file and send it to the users browser for download. I generally create an application to upload the template to the database. Then this template is used to generate the doc. I insert the text by replacing variables for textblocks. Look into the php documentation for replacing text for other text.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Hello @aducom
      Would you please help me in how I pass variables to a documents that already stored in the DB.
      Thanks
      Scriptcase V8.1 Enterprise Edition.

      Comment


      • #4
        The best way is to use parameter substitution. I generally use parameters in the form [%myparm%]. It's very straight forward. You save your templates with these vars, create an array with the values. I have a library function that parses the array of parameters and substitutes it in the template to generate a full file.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          Thanks Albert.
          Scriptcase V8.1 Enterprise Edition.

          Comment

          Working...
          X