For testing purposes we save the pdf doc to the desktop
The saved pdf file displays all the characters correctly but when we come to call PrintDoccument.Print() some of the Chinese characters are missing. It seems strange that only certain characters are missing and not others.
Attached are screenshots of the results.
Code snippet below:
- Code: Select all
await stream.CopyToAsync(memStream).ConfigureAwait(false);
doc.LoadFromStream(memStream);
doc.PrinterName = safePrinterName;
doc.PageSettings.Size = PdfPageSize.A4;
doc.PrintDocument.DefaultPageSettings.Landscape = true;
doc.PrintDocument.DefaultPageSettings.Margins = new Margins();
doc.PageScaling = PdfPrintPageScaling.FitSize;
doc.SaveToFile(@"C:\Users\ben.saunders\Desktop\msg.pdf");
doc.PrintDocument.Print();
Data that should be displayed:
6937601700203 乐购三色圆椒
2363563000000 乐购多宝鱼
6947098800072 乐购大葱
2313949000000 乐购条装国产柠檬
2313905000000 乐购椰子
2313911000000 乐购海南椰皇
6950726900600 乐购精选袋装进口橙
2363864000000 乐购超值猕猴桃
6937601700197 乐购青圆椒
2313335000000 佳沛奇异果