Convert Chinese Font using jpegdevice

Hi,
My company Pou Chen have purchased Aspose.Pdf Product Family version 10.5 and we got some problem with Chinese font conversion and I am asking the question for them. The code is as below. We convert a pdf to image using jpegdevice, but the Chinese encoding turns out to be random characters in the image. Is there a way to specify the encoding like for Aspose Txt so the jpegdevice can convert the Chinese font properly?

using (FileStream imageStream = new FileStream(@“C:\Debug” + filename + “.jpg”, FileMode.Create))
{
// Create Resolution object
Resolution resolution = new Resolution(200);

// Create JPEG device with specified attributes (Width, Height, Resolution, Quality)
// where Quality [0-100], 100 is Maximum
JpegDevice jpegDevice = new JpegDevice(resolution, 100);
jpegDevice.RenderingOptions.BarcodeOptimization = true;
[//jpegDevice.RenderingOptions.SystemFontsNativeRendering](https://jpegdevice.renderingoptions.systemfontsnativerendering/) = false;
[//Aspose.Pdf.LoadOptions](https://aspose.pdf.loadoptions/) option = new Aspose.Pdf.LoadOptions();

// Convert a particular page and save the image to stream
jpegDevice.Process(pdfDocument.Pages[pageCount], imageStream);

// Close stream
imageStream.Close();
}

We managed to get the correct encoding by converting PDF to Word then to JPG, but if there is a way to get correct encoding by converting PDF to JPG, let us know as well! Thanks!

Hi Chang,


Thanks for your feedback It is good to know that you have manged to accomplish your requirement using a workaround. However please share your sample PDF document here, we will look into it and will guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,

Hi Chang,


Thanks for using our API.

Can you please share your input/source PDF file, so that we can test the PDF to JPEG conversion in our environment. We are sorry for your inconvenience.

Hi, the attachment below is the PDF file we used for the conversion. Please let us know if more documents are needed. Thanks!

Hi Chang,


Thanks for sharing source PDF document. We have noticed the reported issue, Chinese characters are being rendered incorrectly in resultant image. So we have logged a ticket PDFNEWNET-38882 in our issue tracking system for further investigation and resolution.

We are sorry for the inconvenience caused.

Best Regards,