Skip to main content
Participant
April 19, 2021
Question

Documnent Marge with HTML inside the Json

  • April 19, 2021
  • 1 reply
  • 579 views

Hello, i would like to use the Document Merge feature of the Document Services API to create a pdf by using a  MS Word template and a JSON file.

 

Is it possibile to have HTML inside the JSON file ?

For example if i have in the Json

 

"paymentTerms": "<strong>Hello world</strong>"

 

when I generate a PDF from a word template that have written

 

Payment terms

{{paymentTerms}}

 

I would like to see Hello world in the generated document.

Is that possible with document merge ?

If not how do you suggest to obtain the same result ?

My Json is generated from a POJO object.

 

Thank you for the answers!

 

 

 

This topic has been closed for replies.

1 reply

Ben Vanderberg
Community Manager
Community Manager
April 19, 2021

Hi @ICGEB98BC ,

 

I like your way of thinking! Right now, we don't quite have that option, but it is in our roadmap.

 

In the mean time, if you are wanting to merge HTML into a PDF, your best option right now would be to use the Create PDF action which allows you to convert HTML to PDF.

ICGEB98BCAuthor
Participant
April 20, 2021

Hello and thank you for your answer.

So if I understand well i should convert my POJO in a JSON object and merge it with an HTML template to produce the PDF

And if i want a DOCX from that PDF i should convert it.

Am I right ?

When do you plan to release this function ?

I ask because build a template in DOCX is easier for people that usually do not mange HTML pages.

ICGEB98BCAuthor
Participant
April 20, 2021

Also it would be great if you can support Base 64 images inside the HTML code in the JSON.