I used the method “\ phpoffice \ phpword \ shared \ HTML:: addhtml ($section, $content)” to convert HTML content into word documents, which fulfilled my requirements
However, a problem was found: table display exception
After reading the source code analysis, I found the cause, which was caused by the error of a regular matching rule (attached picture). The width of my table was 97.857%, and this regular only matched 857%. After calculation, the width of the table became 42850 (857X50), which was only enough to show the first column in Word, and the following columns disappeared
I’m not a professional front-end person, so I changed the width of my form to 97%, discarding the number after the decimal point
source code: