//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 tryEncoding=System. Text. Encoding. GetEncoding (" gb2312 ")
CodePudding user response:
See don't understand, how should solveCodePudding user response:
Encoding=System. Text. Encoding. GetEncoding (" utf-8 "); This Text errorCodePudding user response:
https://blog.csdn.net/qq_35617517/article/details/80879955 can try this