Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-8201

Add support for document rendition via Office Templating

    XMLWordPrintable

    Details

    • Type: User story
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.6-RC1, 5.6
    • Component/s: Renditions
    • Impact type:
      API added

      Description

      Use cases

      There are several cases where it makes sens to generate a rendition of a Nuxeo Document.

      Typically :

      • you store product related information in Nuxeo
        => you want to generate a Product description file in .doc or .pdf
        (with most important meta-data + version and history info + picture)
      • you manage mails in Nuxeo
        => you want to generate the response letter
        (with logo, custom header ...)
      • you store Specifications / Code audit / Benchmark results in Nuxeo
        => you want to generate the delivrable report
        (with Cover page, Index, and data aggregated from several documents ...)

      We already have several features like this in Nuxeo Platform :

      • generate PDF / Excel view via JSF / Seam / iText
        => but template is not easy to update for users
        => page layout must remain simple
      • generate BIRT reports
        => creating a BIRT report design can be complicated
        => the goal of BIRT is more data aggregation and BI than rendering

      Constraints

      Easy templating

      The main constraints has to be the template model.
      In a lot of cases, users need to be able to modify the template, but :

      • contributing XML / Layouts is either :
      • not flexible enough
      • not powerful enough
      • writting complete JSF / Freemarker template seen complicated

      Truth is that most people want to use Office tools (like MSO or OpenOffice) to do that.

      Standard based

      As much as possible we need to rely on "standard" like OpenDocument and DocX.

      It's easier to use XML based generation and it avoids relying on a running OpenOffice server.

      Approach

      We have already done some successful tests with DocX and JODReport.
      The approach of JODReport, using Freemarker to generate OpenDocument seems like the right one.

      On the Nuxeo level we have :

      • a TemplateDocument : this documents holds the template file as well as some default parameters
      • a TemplateBasedDocument : this is a standard Nuxeo Document that is associated with a Template and can then support rendition

      In the prototype the logic is bound to Facets so that you can create a rendition from potentially any kind of Document (this may require to store the resulting rendering in a field associated to the facet wich is not the case for now).

      High level User Story

      1. Template file creation
        • create an office document via OpenOffice or MSOffice
        • From within the editor program I mark some fields or section to be merge/replaced
          (basically I tag the Document)
      2. Create the Template document in Nuxeo
        • Inside Nuxeo I create a new Template Document and upload my template file
        • Nuxeo extract the structure from the template file and gives me a listing of the fields
          • I can define types and binding for each fields ( direct value, or XPath to document properties)
          • I can add fields if needed
      3. Create a Template Based document in Nuxeo
        • For selected Document types when I create them I can select the associated template
        • If some parameters are still unset at template level the user will be prompted to enter them

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tdelprat Thierry Delprat
                Reporter:
                tdelprat Thierry Delprat
                Participants:
              • Votes:
                3 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 5 weeks, 1 day, 5 hours
                  5w 1d 5h
                  Remaining:
                  Time Spent - 2 weeks, 5 hours Remaining Estimate - 3 weeks
                  3w
                  Logged:
                  Time Spent - 2 weeks, 5 hours Remaining Estimate - 3 weeks Time Not Required
                  2w 5h