Plans for new extension(s) - Ecosystem for Document Transformation

I have a number of extensions under development at present relating to data/file format conversion.
While some stand alone (xml=>json, KanBan board), my overall vision is to use code from some of my existing extensions and add more functionality to allow a level of templating

Before I finalise (i am about ready for Beta of most) i thought i would share my vision looking forward and solicit any comments users may have re functionality or indeed usefulness.

While we as developers tend not to be fans of word docs, customers are so:

  1. docx => html
    Conversion of docx. files to html with formatting options or raw (latter strips all formatting retruning text only)
    This is via the npm "mammoth"

This can also be used to clean docx documents leaving either basic HTML formatting or completely raw content

The docx file can be uploaded via app connect, be already present on server or pulled direcly from a remote using "Get file from URL or API"

  1. JSON => HTML table
    This is effectively a simplified server connect version of the bootstrap generator. It takes a JSON output from a data query and returns the HTML to display it as a table. (to insert dynamic tables into static actions like mailer)

  2. Utlising code from "Intelligent merge"
    Dynamic data to then be "injected" into placeholders within the HTML present either locally or the output of the docx=>html function.
    This would allow for both mailmerge type field substitution or dynamic table insertion

  3. PDF output
    Ouput as pdf with additional ability to "insert" dynamic tables (generated via [2])
    (via puppeteer npm extending what we currenly have available from other members)

So effectively an html or .docx template something like:

Dear [forname] [surname]
Here is a copy of your recent purchases
[Query:Purchase]

Your recent payments are listed below:
[Query:Payments]

Thank you
[account_manager_name]
Accounts Department

fed into the extension would result in an html output with all fields merged with a data query and all [Query:] sections replaced by html tables listing the data in the queries.

Your views?

7 Likes

Brian, this is not just a hallelujah moment—this is the chorus, the bridge, and the encore. You're sketching out a modular, highly pragmatic ecosystem for document transformation that aligns beautifully with how our clients want things to work.

Edit: Now how about the cherry on top of a crème brûlée finale, Brian. :cocktail:

An e-signature module would elevate this from a document toolkit to a full-fledged digital agreement platform. Picture this:

  • :lock_with_ink_pen: Signature placeholders like [Signature:ClientName] that render into signable fields in HTML or PDF.
  • :fountain_pen: Draw/type/upload options for clients during sign-off—integrated either via a browser-based canvas or a service like DocuSeal or HelloSign API.
  • :closed_lock_with_key: Audit trails with timestamped data, IPs, and signer identity stored for compliance.
  • :repeat: Multi-signer workflows where a document is routed dynamically based on rules or roles.
  • :arrows_counterclockwise: Webhook or server action callback post-signature to trigger status updates, file archival, or next-step automations.

Suddenly you're not just formatting content—you’re automating approvals, contracts, and consent capture. That’s not cream. That’s full cream with a splash of brandy and a twist of lemon zest.

3 Likes

Thats the kind of feedback i was hoping for ben.

Brilliant ideas.

ESigning was already lurking in the back of my mind, everything you suggest should be doable.
I will start the research!

1 Like

Your docx conversion hits the nail on the head. MS Word copy/pasting from my front end users is the absolute bane of my life. I'm sure almost everyone else suffers too.

Overall, the combos you mention above will allow much easier formatting/sending of invoices for example - I've been using your mail merge extension a lot and its a killer app - very well executed and highly effective.

2 Likes

Not sure at this stage how we can deal with a mix of HTML (from summernote for example) and pasted word text with all it's horrible embedded formating but i will add the idea to the drawing board.

1 Like

the main problem is the additional MS Word formatting, its terrible.

Brian, this is superb and I'm sure will be a massive help for most people.

You will have anticipated my response, I'm sure. I assume this will be NodeJS only? My concern is that Wappler has always been a tool for multiple server models. I appreciate ASP is getting close to end of life but PHP certainly isn't and it's still the most affordable way to host busy websites and has the biggest community.

So this is just furthering the path towards Wappler being a one-model platform. While that shouldn't be a big problem, we can all move to node hosting and make that our norm, a lot of us have projects we started many years ago in PHP which simply can't be switched to node so these wonderful extensions just won't be available.

It feels like I'm being teased somewhat! :rofl:

Following on from @ben's post, this is a signature jquery plugin I have successfully used within a Wappler project and the signature is stored in the database so it's very tidy:

http://keith-wood.name/signature.html

Hope it helps.

I understand what you are saying @sitestreet but there are strong reasons for the node only approach i adopt.

A lot of my extensions leverage functionality from modules on npm/github and there are not a lot of php libraries for some of the later innovations compared with node.

So i can often implement an extension with a dozen lines of .js utilising an npm where a php version would required a full bottom up creation.

I have no problem with others producing php versions based on my work, in fact i welcome it and will support them as best i can.

On a more selfish point, i love js/node.js as a language, its just so much more eloquent than php. I do these extensions for fun, unpaid. i feel doing everything twice, especially if the second time is in a language i am not a big fan of, would suck the joy out of it.

Thanks for the signature link, i try to avoid jQuery where possible but will happily use it if necesary.

1 Like

Yes Brian, jQuery is a relic; we Node developers prefer modern, expressive syntax. :sunglasses:

There was/is some website around that beautified a Word HTML export, if you're looking for inspiration

I am using mammoth npm. it does concentrate more on structural conversion than visual.
It supports .docx to html style mapping but it is not a simple task.

Images are converted to base64 but layout is poor.
Always interested in any tool to improve things.
Can you recall what tool you refer to?