PHP Create a new document from a template and insert HTML

This post: How to create template document using Aspose? - #3 by sudheer_cv - Free Support Forum - aspose.com suggests that it is possible to create a new document based on a dotx template.

However, PHP API only accepts the new filename as a parameter:

$createRequest = new CreateDocumentRequest(
    "Sample.docx", NULL, NULL);
$wordsApi->createDocument($createRequest);

How do I create a new document based on a dotx template (which is stored in my online storage)?

I then need to append some html formatted text - other APIs seem to have a builder object:

builder.InsertHtml("<b>Format this as bold</b>")

but the PHP API doesn’t.

@FFSPUD

We have logged a ticket (WORDSCLOUD-2318) for further investigation.

You can use the mail merge feature to insert HTML text into a document. Please check the following post for an idea. You can use the sample template and data to test the feature. Hopefully, it will help you accomplish the task.