Home > Net >  Using Aspose. There was a Chinese word turn word PDF gibberish
Using Aspose. There was a Chinese word turn word PDF gibberish

Time:10-19

Using Aspose. There was a Chinese word turn word PDF garbled
//transcoding, turn Word PDF
Document doc=new Document (listBox1 GetItemText (listBox1. Items [0]));
Doc. RemoveAllChildren ();

Filepath string []=new string [listBox1. Items. The Count];
for (int i=0; I & lt; Filepath. Length; I++)
{
Filepath. [I]=listBox1 GetItemText (listBox1. Items [I]);
Encoding Encoding;
Encoding=System. Text. Encoding. GetEncoding (" utf-8 ");


The Document srcDoc=new Document (filepath [I]);
Doc. AppendDocument (srcDoc, ImportFormatMode UseDestinationStyles);
}

//doc. Save (savePath, SaveFormat. Pdf);
Doc. Save (savePath, SaveFormat. Pdf);

CodePudding user response:

Could you tell me the landlord to solve this problem?
Recently met a garbled question, ask for help!

CodePudding user response:

Encoding=System. Text. Encoding. GetEncoding (" utf-8 "); Change the following try

Encoding=System. Text. Encoding. GetEncoding (" gb2312 ")

CodePudding user response:

See don't understand, how should solve

CodePudding user response:

Encoding=System. Text. Encoding. GetEncoding (" utf-8 "); This Text error

CodePudding user response:

https://blog.csdn.net/qq_35617517/article/details/80879955 can try this
  •  Tags:  
  • C#
  • Related