Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-20296

Ability to inject LibreOffice filters in Jodconverter export

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 13.10
    • Office
    • None
    • Unknown

    Description

      In DefaultOfficeServer there is this code:

                    this.jodConverter = LocalConverter.builder().officeManager(this.jodManager)
                          .formatRegistry(JsonDocumentFormatRegistry.create(input))
                          .filterChain(new LinkedImagesEmbedderFilter()).build();
                  } else {
                      this.logger.debug("{} is missing. The default document format registry will be used instead.",
                          DOCUMENT_FORMATS_PATH);
                  }
              } catch (Exception e) {
                  this.logger.warn("Failed to parse {} . The default document format registry will be used instead.",
                      DOCUMENT_FORMATS_PATH, e);
              }
      
              if (this.jodConverter == null) {
                  // Use the default document format registry.
                  this.jodConverter = LocalConverter.builder().officeManager(this.jodManager)
                      .filterChain(new LinkedImagesEmbedderFilter()).build();
              }
      

      The idea is to be able to provide filters as XWiki components that would be injected in the filter chain using filterChain(). These filters would be then coded in java or using ScriptComponent module in groovy. Filters should be able to access XWiki configuration and environment in order to take configuration parameters or read data in the wiki.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ludovic Ludovic Dubost
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: