web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

how to convert the chinese language word document template in pdf.

(0) ShareShare
ReportReport
Posted on by 22

This is my code. It is processed only english language word document not chinese language word document.

public static byte[] ConvertFile(ITracingService tracingService, byte[] infile, string url)
{
byte[] toArray;

try
{
using (HttpClient httpClient = new HttpClient())
{


MultipartFormDataContent multipartContent = new MultipartFormDataContent();
ByteArrayContent byteArrayContent = new ByteArrayContent(infile);
byteArrayContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment") {FileName = "file"};
byteArrayContent.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");

multipartContent.Add(byteArrayContent);

HttpResponseMessage retrieveResponse = httpClient.PostAsync(url, multipartContent).Result;
if (retrieveResponse.IsSuccessStatusCode)
toArray = retrieveResponse.Content.ReadAsByteArrayAsync().Result;
else
{
tracingService.Trace($"Error in ConvertFile: {retrieveResponse.StatusCode}");
throw new InvalidPluginExecutionException($"Error in ConvertFile: {retrieveResponse.StatusCode}");
}
}
}
catch (Exception e)
{
tracingService.Trace($"Error in ConvertFile: {e}");
throw new InvalidPluginExecutionException(e.Message);
}

return toArray;
}

I have the same question (0)
  • Guido Preite Profile Picture
    54,086 Moderator on at

    the code you posted is dealing only with binary data, has nothing to do with the language inside the word document (or if is a word document at all)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 101

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 69 Super User 2025 Season 2

#3
TAHER Mehdi Profile Picture

TAHER Mehdi 58

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans