Free Support Forum - aspose.cloud

Convert Microsoft Word document to HTML using Aspose.Words REST API breaks placeholder into pieces

my word doc has placeholders like $123$,
but when it to html, the ‘$123$’ is broken to ‘<span>$</span><span>12</span><span>3$</span>’ or others.
I don’t want to this, I just want to ‘<span>$123$</span>’. Help me ,please.

@danielchen

We are sorry for your inconvenience. I have tested the scenario with a sample DOCX file and unable to notice the reported issue. We will appreicate it if you please share your sample document here as a zip file, we will look into it and will investigate it further.

image.png (31.7 KB)
image.png (127.8 KB)
sample.docx.zip (31.4 KB)

The first,ths for your reply.
My question like the imgs, the 1st img write to word,when i convert to html the $9009$ not $9009$ ,it changes $ and 9 and 009$,so what should i do to keep it is $9009$?

@danielchen

Thanks for sharing your sample document. We have tested the scenario and noticed the reported issue, so logged a ticket WORDSCLOUD-941 in our issue tracking system for further investigation and rectification. We will notify you as soon as it is resolved.

@danielchen

Thanks for your patience. We have investigated your document and found it is expected behavior to break placeholder in DOCX to HTML conversion. If we extract your Word document and look at the paragraph data we noticed that the placeholder is already split into some pieces in the Word document. So Aspose.Words Cloud keeps the splitting in DOCX to HTML conversion.

image.png (31.3 KB)

As a work around remove the placeholder from word document and recreate it. It will resolve the issue.