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

          1.
          Initial prototype Sub-task Resolved Thierry Delprat

          100%

          Original Estimate - 2 days
          Time Spent - 2 days
          2.
          Migrate from Custom DocX+JODReport to XDocReport Sub-task Resolved Thierry Delprat

          78%

          Original Estimate - 2 days
          Time Spent - 1 day, 4 hours Remaining Estimate - 3 hours
          3.
          Add support for Document Composition Sub-task Resolved Thierry Delprat

          28%

          Original Estimate - 3 days
          Time Spent - 4 hours Remaining Estimate - 1 day, 3 hours Time Not Required
          4.
          Bind Audit inside rendering context Sub-task Resolved Thierry Delprat

          75%

          Original Estimate - 4 hours
          Time Spent - 3 hours Remaining Estimate - 1 hour
          5.
          Plug output converters Sub-task Resolved Thierry Delprat

          57%

          Original Estimate - 1 day
          Time Spent - 4 hours Remaining Estimate - 3 hours
          6.
          Plug preview system Sub-task Open Thierry Delprat

          0%

          Original Estimate - 2 days
          Remaining Estimate - 2 days
          7.
          Make a set of nice template examples Sub-task Resolved Thierry Delprat

          0%

          Original Estimate - 1 day
          Remaining Estimate - 1 day
          8.
          Add default template binding for doc type Sub-task Resolved Thierry Delprat

          85%

          Original Estimate - 1 day
          Time Spent - 6 hours Remaining Estimate - 1 hour
          9.
          Rendition > Misc UI work Sub-task Resolved Thierry Delprat

          71%

          Original Estimate - 2 days
          Time Spent - 1 day, 3 hours Remaining Estimate - 4 hours
          10.
          Polish / Cleanup API Sub-task Resolved Thierry Delprat

          28%

          Original Estimate - 1 day
          Time Spent - 2 hours Remaining Estimate - 5 hours
          11.
          Marketplace package Sub-task Resolved Thierry Delprat

          0%

          Original Estimate - 4 hours
          Remaining Estimate - 4 hours
          12.
          Documentation Sub-task Resolved Thierry Delprat

          0%

          Original Estimate - 4 hours
          Remaining Estimate - 4 hours
          13.
          Correct Handling of rendering errors Sub-task Resolved Thierry Delprat

          0%

          Original Estimate - 2 hours
          Remaining Estimate - 2 hours
          14.
          Allow to detach template Sub-task Resolved Thierry Delprat

          0%

          Original Estimate - 1 hour
          Remaining Estimate - 1 hour
          15.
          Add Raw Freemarker and XSLT processor Sub-task Resolved Thierry Delprat

          100%

          Original Estimate - 4 hours
          Time Spent - 4 hours
          16.
          Make template editable at instance level Sub-task Resolved Thierry Delprat

          42%

          Original Estimate - 1 day
          Time Spent - 3 hours Remaining Estimate - 4 hours
          17.
          Integrate with Rendition Sub-task Resolved Thierry Delprat

          0%

          Original Estimate - 2 days
          Remaining Estimate - 2 days
          18.
          Extend FileWidget to allow template selection Sub-task Resolved Thierry Delprat  
          19.
          Add a Function in Freemarker Fn context to access vocabularies features Sub-task Resolved Thierry Delprat  
          20.
          Allow to bind several template per document Sub-task Resolved Thierry Delprat

          66%

          Original Estimate - 3 days
          Time Spent - 2 days Remaining Estimate - 1 day
          21.
          Add JXLS Template processor Sub-task Resolved Thierry Delprat

          0%

          Original Estimate - 2 days
          Remaining Estimate - 2 days
          22.
          Make Rendering context pluggable Sub-task Resolved Thierry Delprat

          0%

          Original Estimate - 1 day
          Remaining Estimate - 1 day
          23.
          Add french translations Sub-task Resolved Thierry Delprat  
          24.
          Add JAXRS module to handle WebTemplate extensions Sub-task Resolved Thierry Delprat  

            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