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

Announcements

No record found.

News and Announcements icon
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

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 197 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 70

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans