Giter VIP home page Giter VIP logo

openxml-document-generator's Introduction

OpenXML Document Generator

travis build

Generates documents from html into openxml standard.

The goal of this generator is to improve efficiency in the UX process.

  • Use an open standard XML
  • Use open standard HTML/CSS
  • Generate all document types from one central point
    • Web site
    • Print formats
  • Databind from one central point to generate these documents
  • Showcase the document process flow in BPMN Camunda tooling using ZDS.

More information on ZDS can be found at: https://github.com/VNG-Realisatie/gemma-zaken

Status of this project

The openAPI has a create document function and an /enqueue function, which uses hangfire for queing jobs in case you need to asynchronously generate documents. https://www.hangfire.io/

The default implementation is currently set to : LiteDB. LiteDB can be found at: https://github.com/mbdavid/LiteDB

more about hangfire can be found at:

Currently there's a "unit" test in place which generates a docx openxml document and showes that images are resolved in that document.

        public void can_convert_html_to_openxml_document()
        {
            var doc = File.ReadAllText(@".\data\letter.html");
            using (MemoryStream generatedDocument = new MemoryStream())
            {
                using (WordprocessingDocument package = WordprocessingDocument.Create(generatedDocument, WordprocessingDocumentType.Document))
                {
                    MainDocumentPart mainPart = package.MainDocumentPart;
                    if (mainPart == null)
                    {
                            mainPart = package.AddMainDocumentPart();
                            new Document(new Body()).Save(mainPart);
                    }
                    HtmlConverter converter = new HtmlConverter(mainPart);
                    converter.ParseHtml(doc);
                    mainPart.Document.Save();
                }
                // visually test this.
                File.WriteAllBytes(@".\test.docx", generatedDocument.ToArray());
            }
        }    
    }

More information on the camunda bpmn project (samples) can be found at: https://github.com/sjefvanleeuwen/camunda-process-examples

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Building Docker Images

docker-compose up --build -d

The API should now be reachable from:

  • SWAGGER - Swagger API documentation page
  • REDOC - Redoc API documentation page

Built With

  • VSCODE - The IDE used
  • DOCKER - Build, Ship, and Run Any App, Anywhere

Contributing

Pull requests are accepted

Authors

  • Sjef van Leeuwen - Initial work - github

License

This project is licensed under the GPL-V3 License - see the LICENSE.md file for details

openxml-document-generator's People

Contributors

sjefvanleeuwen avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.