Convert html to docx

Hello. I’m trying to convert html to docx and I have the following problem. I have css styles and I just added a tag after the html string with a description of most of the classes that I need. But in some places I have a style attribute in the tags, and this attribute should be more important when converting, just as it is more important in css, but the converter simply does not see this style attribute. Is it possible to somehow solve it?

Hi @belevich00, please provide the file you are converting so we could reproduce the issue.

@Carl Sure.
file1-without dinamic styles.docx (9.7 KB)
i cant upload html, this is forbidden.
As you will see text-align didnt work, but it of course works in browser.

I added classes automatically based on the style attribute in the tag. and this works, but not quite. For example text-align works but font-size not.
file2-with dinamic styles.docx (9.8 KB)

Is it possible to solve it somehow? Also could you please tell me, is it possible to somehow create a page break,header and footer(colontituls) and an album orientation for the page?

@Constantine @Carl @Nikolas @Alexandre. Is it possible to solve this problem?

Hi @belevich00

The first thing I would like to know, version of the document server.

When converting HTML to DOCX in 8.0, I couldn’t reproduce the issue.

@Nikolas Big thanks for the answer. I use 7.0.1-37. I tried to use 8.0 version, but i have another problem with 8.0 version. I cant upload file to OnlyOffice. I get error -4 Error while downloading the document file to be converted. My file is on Minio S3 storage and Minio is deployed on my local network, I deploy office in docker locally on my computer. And when I give a link to the file, I get an error -4. I tried to follow the link that I give, I also tried it in incognito mode, the file is downloaded. Maybe problems in config file? OnlyOffice 7.0 is deployed also in local network and it downloaded files well. Maybe i need some additional setting in config?

@belevich00 Please check the converter/out.log file. If there are errors about a private IP address, follow this When I call Conversion API,the editor seems to be blocked - #7 by Carl