This topic is a continuation of this topic:
This Topic is created by sergei.terentev using Email to Topic tool.
This topic is a continuation of this topic:
This Topic is created by sergei.terentev using Email to Topic tool.
@mayurkhadke
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CONVERSIONCLOUD-623
Hi @mayurkhadke ,
I have checked and successfully converted the styled html document you provided, using method “PUT” /conversion.
Here is the result of conversion:
styled.docx (6.9 KB)
Please try using one of our SDKs to convert the document, or, please give a code fragment you are using to perform an API call (please specify programming language in this case).
Hi,
The document you converted seems to be not correct. Also i see ticket created on your end, does it mean its an issue and your team will add a fix?
The document you converted seems to be not correct
Please share more details about expected result
Also i see ticket created on your end, does it mean its an issue and your team will add a fix?
No, it does not always mean confirmed issue. It mean we have started analysis and trying to reproduce the bug, in this case
Hi We use below java springboot code. We use cloud api call directly. So please see if something is wrong in that. First we get the token and then we call this api: https://api.groupdocs.cloud/v2.0/conversion?format=docx
try {
final Resource resource = new FileSystemResource(path.toFile());
body.add("loadOptions", "{\"Format\": \"html\", \"RenderingMode\":\"Flow\"}");
body.add("file", resource);
HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(body, headers);
String uri = groupdocsConvertUrl;
ResponseEntity<byte[]> response =
restTemplate.exchange(uri, HttpMethod.PUT, requestEntity, byte[].class);
return response.getBody();
} catch (Exception e) {
log.error(String.format("Error converting article id: %s. Response %s", mediaId, e.getMessage()), e);
} finally {
Files.deleteIfExists(path);
Files.deleteIfExists(createdPath);
}
Also the expected result in your case is closely matching but sharing expected results as below
image.png (37.1 KB)
Hi, @mayurkhadke,
Answering question about your Java code: Of course, you are free to use any way to call GroupDocs Cloud APIs, however, since it’s not using GroupDocs.Conversion Cloud SDK for Java, we do not support issues in it, but, as I see, you are passing some load options there:
body.add("loadOptions", "{\"Format\": \"html\", \"RenderingMode\":\"Flow\"}");
I have tried these options and noticed that result does not look as expected in this case. Try to make a call without any options - you should get the result, I have provided the previous post. I think it’s the best result we can offer for your html to docx conversion right now.
About the conversion results - I don’t see issues in it, except wrong size of list marks - a squares with “?” symbol. If you want, I can create a ticket and we can try to fix this in future versions. - please confirm if you prefer.
About the image you provided - I see it has “green” style, but source html code has another color - if open it in a browser, for example, so I don’t think this is an issue.
The load options were given to us from groupdocs to solve other issue. So we will try to see if we can test it without it and see how it works. However it will be good if its fixed as we are paying for the cloud API service.
Also the reason we added those cause when we try to edit without that then it does not enable editing in normal mode. Rather it edits in section format. Attaching the document which shows that issue for which we added the load Options.
Preguntas frecuentes_ Shailja’s New NP_July24_OD webcast Solo video 26 de junio.docx (6.3 KB)
Can you please suggest us cleaner solution. Thanks.
Hi, @mayurkhadke, so, if I understand correctly, your request is to fix conversion when using option:
I agree that using this option should not break document look. I will correct the ticket then…