Your most professional bet is to purchase and use the Adobe InDesign Server-edition software which is made to handle automatic customer-facing input (in a legal, and non-free way) and render out the result for web and for print, following the world-class Adobe standards.
Or, you can choose to create your own round-about way to create a client-side personalized experience which can still be processed to 'bring' the input into Adobe standards by using the browser-based SVG technology.
With SVGs, (Scalable Vector Graphics) you can take advantage of quick client processing and their counterpart Illustrator's implementation.
Please start with the following principles:
SVGs have a vast browser implementation which only grows and grows as time goes by and browsers get even more advanced in their handling of SVG graphics.
Adobe Illustrator's SVG handling can export and import the format in a consistent way, but using only a limited sub-set of the browser implementation.
Thus you can invest in your proprietary software development to forego the official InDesign server option for your web-to-print needs by leveraging Illustrator's SVG features.
Now what do I mean by highlighting the differences between the browser-Illustrator differences when it comes to SVG? Please check out this linked example on CodePen:
Open the link and type in some information if you wish. Note how the text is justified as you would expect: the name and title fields are center-justified while the phone numbers are right-justified. Now press the "Submit" button and receive the downloaded SVG file to your "Downloads" folder. Now open the SVG inside of Adobe Illustrator. If you have the appropriate Helvetica font, the Illustrator document created out of the interpreted SVG should look exactly the same as the browser's rendering.
Now, examine the artwork to see various named rectangles around the text and the text itself. You will notice that all of the text is in fact point-text, and all of it is actually left-justified with the text's anchor point all the way on the left side.
Conversely, create a new Illustrator document with area text justified to the right and export it as an SVG. When the document is closed and the SVG is opened in Illustrator, you will see your text turned from area-type into point-type with any indentations resulting from the right-justification being converted to the left-side anchor point at various locations.
What this means:
Yet if you are able to make it work and invest in the proprietary translation logic between web's SVGs and Illustrator documents then it could be a viable solution with no yearly subscription which may help drive your business for years to come. I will also add that this option is only viable if your artwork cases are limited in scope and you can safely rely on the fact that only features which you are comfortable with owning would be represented in your art.