ConverterHelper.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using ComPDFKit_Conversion.Converter;
  7. using System.Diagnostics;
  8. using System.IO;
  9. using Microsoft.AppCenter.Crashes.Ingestion.Models;
  10. using static Dropbox.Api.Sharing.ListFileMembersIndividualResult;
  11. using ComPDFKit_Conversion.Options;
  12. using PDF_Master.CustomControl;
  13. using Exception = System.Exception;
  14. using ImageMagick;
  15. using System.IO.Compression;
  16. using System.Windows;
  17. using System.Net.Mime;
  18. using System.Windows.Controls;
  19. namespace PDF_Master.Helper
  20. {
  21. public static class ConverterHelper
  22. {
  23. public static CPDFConverterWord wordConverter = null;
  24. public static CPDFConverterExcel excelConverter = null;
  25. public static CPDFConverterPPT pptConverter = null;
  26. public static CPDFConverterTxt txtConverter = null;
  27. public static CPDFConverterCsv csvConverter = null;
  28. public static CPDFConverterImg imgConverter = null;
  29. public static CPDFConverterRTF rtfConverter = null;
  30. public static CPDFConverterHTML htmlConverter = null;
  31. public static async Task<bool> WordConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, CPDFConvertWordOptions wordOptions = null, bool IsCustomFileName = true)
  32. {
  33. bool result = false;
  34. try
  35. {
  36. int[] pageArray = pageIndexLists.ToArray();
  37. wordConverter = new CPDFConverterWord(inputpath, pawssword);
  38. string outputFolder = outputpath.Remove(outputpath.LastIndexOf("\\"));
  39. string outputFileName = Path.GetFileNameWithoutExtension(outputpath);
  40. ConvertError error = ConvertError.ERR_UNKNOWN;
  41. string filename = GetFileNameAddSuffix(outputFolder, outputFileName, ".docx");
  42. result = await Task.Run(() => wordConverter.Convert(outputFolder, ref outputFileName, wordOptions, pageArray, ref error, getProgress));
  43. if (result)
  44. {
  45. if (!String.IsNullOrEmpty(outputFileName) && File.Exists(outputFileName.Replace("/", "\\")))
  46. {
  47. CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
  48. }
  49. }
  50. }
  51. catch (Exception ex)
  52. {
  53. }
  54. return result;
  55. }
  56. public static async Task<bool> PPTConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, CPDFConvertPPTOptions pptOptions = null, bool IsCustomFileName = true)
  57. {
  58. bool result = false;
  59. try
  60. {
  61. int[] pageArray = pageIndexLists.ToArray();
  62. pptConverter = new CPDFConverterPPT(inputpath, pawssword);
  63. string outputFolder = outputpath.Remove(outputpath.LastIndexOf("\\"));
  64. string outputFileName = Path.GetFileNameWithoutExtension(outputpath);
  65. ConvertError error = ConvertError.ERR_UNKNOWN;
  66. string filename = GetFileNameAddSuffix(outputFolder, outputFileName, ".ppt");
  67. result = await Task.Run(() => pptConverter.Convert(outputFolder, ref outputFileName, pptOptions, pageArray, ref error, getProgress));
  68. if (result)
  69. {
  70. if (!String.IsNullOrEmpty(outputFileName) && File.Exists(outputFileName.Replace("/", "\\")))
  71. {
  72. CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
  73. }
  74. }
  75. }
  76. catch (Exception ex)
  77. {
  78. }
  79. return result;
  80. }
  81. public static async Task<bool> ExcelConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, CPDFConvertExcelOptions ExcelOption, bool IsCustomFileName = true)
  82. {
  83. bool result = false;
  84. try
  85. {
  86. excelConverter = new CPDFConverterExcel(inputpath, pawssword);
  87. int[] pageArray = pageIndexLists.ToArray();
  88. string outputFolder = outputpath.Remove(outputpath.LastIndexOf("\\"));
  89. string outputFileName = Path.GetFileNameWithoutExtension(outputpath);
  90. ConvertError error = ConvertError.ERR_UNKNOWN;
  91. result = await Task.Run(() => excelConverter.Convert(outputFolder, ref outputFileName, ExcelOption, pageArray, ref error, getProgress));
  92. if (result)
  93. {
  94. if (!String.IsNullOrEmpty(outputFileName) && File.Exists(outputFileName.Replace("/", "\\")))
  95. {
  96. CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
  97. }
  98. else if (outputFileName == "NoTable")
  99. {
  100. AlertsMessage alertsMessage = new AlertsMessage();
  101. alertsMessage.ShowDialog("", " No Table", App.ServiceLoader.GetString("Text_ok"));
  102. }
  103. }
  104. }
  105. catch (Exception ex)
  106. {
  107. }
  108. return result;
  109. }
  110. //public static async Task<bool> TableConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword)
  111. //{
  112. // bool result = false;
  113. // try
  114. // {
  115. // int[] pageArray = pageIndexLists.ToArray();
  116. // tableConverter = new CPDFConverterTable(inputpath, pawssword);
  117. // string outputFolder = outputpath;
  118. // string outputFileName = Path.GetFileNameWithoutExtension(inputpath);
  119. // ConvertError error = ConvertError.ERR_UNKNOWN;
  120. // string filename = GetFileNameAddSuffix(outputFolder, outputFileName, ".xlsx");
  121. // result = await Task.Run(() => tableConverter.Convert(outputFolder, ref outputFileName, pageArray, ref error, getProgress));
  122. // }
  123. // catch (Exception ex)
  124. // {
  125. // }
  126. // return result;
  127. //}
  128. public static async Task<bool> CSVConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, CPDFConvertCsvOptions csvOptions = null, bool IsCustomFileName = true)
  129. {
  130. bool result = false;
  131. try
  132. {
  133. int[] pageArray = pageIndexLists.ToArray();
  134. csvConverter = new CPDFConverterCsv(inputpath, pawssword);
  135. string outputFolder = "";
  136. string outputFileName = "";
  137. if (IsCustomFileName)
  138. {
  139. outputFolder = outputpath.Remove(outputpath.LastIndexOf("\\"));
  140. outputFileName = Path.GetFileNameWithoutExtension(outputpath);
  141. }
  142. else
  143. {
  144. outputFolder = outputpath;
  145. outputFileName = Path.GetFileNameWithoutExtension(inputpath);
  146. }
  147. ConvertError error = ConvertError.ERR_UNKNOWN;
  148. string filename = GetFileNameAddSuffix(outputFolder, outputFileName, ".csv");
  149. result = await Task.Run(() => csvConverter.Convert(outputFolder, ref outputFileName, csvOptions, pageArray, ref error, getProgress));
  150. if (result)
  151. {
  152. if (File.Exists(outputFileName))
  153. {
  154. if (IsCustomFileName)
  155. {
  156. if (!String.IsNullOrEmpty(outputFileName) && File.Exists(outputFileName.Replace("/", "\\")))
  157. {
  158. CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
  159. }
  160. }
  161. else
  162. {
  163. string FileName = CommonHelper.CreateFolder(outputFileName.Replace(".zip", ""));
  164. ZipFile.ExtractToDirectory(outputFileName, FileName);
  165. File.Delete(outputFileName);
  166. CommonHelper.ShowFileBrowser(FileName.Replace("/", "\\"));
  167. }
  168. }
  169. else
  170. {
  171. AlertsMessage alertsMessage = new AlertsMessage();
  172. alertsMessage.ShowDialog("", " No Table", App.ServiceLoader.GetString("Text_ok"));
  173. }
  174. }
  175. }
  176. catch (Exception ex)
  177. {
  178. }
  179. return result;
  180. }
  181. public static async Task<bool> TxtConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, CPDFConvertTxtOptions txtOptions = null, bool IsCustomFileName = true)
  182. {
  183. bool result = false;
  184. try
  185. {
  186. int[] pageArray = pageIndexLists.ToArray();
  187. txtConverter = new CPDFConverterTxt(inputpath, pawssword);
  188. string outputFolder = outputpath.Remove(outputpath.LastIndexOf("\\"));
  189. string outputFileName = Path.GetFileNameWithoutExtension(outputpath);
  190. ConvertError error = ConvertError.ERR_UNKNOWN;
  191. string filename = GetFileNameAddSuffix(outputFolder, outputFileName, ".txt");
  192. result = await Task.Run(() => txtConverter.Convert(outputFolder, ref outputFileName, txtOptions, pageArray, ref error, getProgress));
  193. if (result)
  194. {
  195. if (!String.IsNullOrEmpty(outputFileName) && File.Exists(outputFileName.Replace("/", "\\")))
  196. {
  197. CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
  198. }
  199. }
  200. }
  201. catch (Exception ex)
  202. {
  203. }
  204. return result;
  205. }
  206. public static void ImageMagickPDFToImage(string imageType, string filePath, string outputFolder, string outputFileName, ref string FileName, double density = 150)
  207. {
  208. FileName = CommonHelper.CreateFolder(outputFolder + "\\" + outputFileName);
  209. ZipFile.ExtractToDirectory(filePath, FileName);
  210. var files = Directory.GetFiles(FileName, "*.png");
  211. int i = 0;
  212. var images = new MagickImageCollection();
  213. foreach (var file in files)
  214. {
  215. //pdf整体转为gif,将.gifoff改为.gif
  216. Trace.WriteLine(file);
  217. if (imageType == ".gifoff")
  218. {
  219. images.Add(file);
  220. images[i].AnimationDelay = 100; // in this example delay is 1000ms/1sec
  221. images[i].Flip();
  222. }
  223. using (var image = new MagickImage(file))
  224. {
  225. if (imageType != ".gifoff")
  226. {
  227. //Save frame as jpg
  228. //image.Format = MagickFormat.Jp2;
  229. //水平垂直DPI
  230. image.Density = new Density(density);
  231. image.Write(file.Remove(file.LastIndexOf(".png"), 4) + imageType);
  232. }
  233. // 删除该文件
  234. System.IO.File.Delete(file);
  235. }
  236. }
  237. if (imageType == ".gifoff")
  238. {
  239. // Optionally reduce colors
  240. var settings = new QuantizeSettings();
  241. settings.Colors = 256;
  242. images.Quantize(settings);
  243. // Optionally optimize the images (images should have the same size).
  244. images.Optimize();
  245. // Save gif
  246. int fileIndex = 1;
  247. if (File.Exists(outputFolder + "\\" + outputFileName + ".gif"))
  248. {
  249. while (fileIndex >= 1)
  250. {
  251. if (!File.Exists(outputFolder + "\\" + outputFileName + "_" + fileIndex + ".gif"))
  252. {
  253. images.Write(outputFolder + "\\" + outputFileName + ".gif");
  254. fileIndex = -1;
  255. }
  256. fileIndex++;
  257. }
  258. }
  259. else { images.Write(outputFolder + "\\" + outputFileName + ".gif"); }
  260. }
  261. //else {
  262. // int fileIndex = 1;
  263. // if (File.Exists(outputFolder + "\\" + outputFileName + ".zip"))
  264. // {
  265. // while (fileIndex>=1) {
  266. // if (!File.Exists(outputFolder + "\\" + outputFileName + "_" + fileIndex + ".zip"))
  267. // {
  268. // ZipFile.CreateFromDirectory(outputFolder + "\\" + outputFileName, outputFolder + "\\" + outputFileName + "_" + fileIndex + ".zip");
  269. // fileIndex=-1;
  270. // }
  271. // fileIndex++;
  272. // }
  273. // }
  274. // else { ZipFile.CreateFromDirectory(outputFolder + "\\" + outputFileName, outputFolder + "\\" + outputFileName + ".zip"); }
  275. //}
  276. //DirectoryInfo di = new DirectoryInfo(outputFolder + "\\" + outputFileName);
  277. //di.Delete(true);
  278. }
  279. public static async Task<bool> ImgConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, string imageType = ".png", CPDFConvertImgOptions imgOptions = null)
  280. {
  281. string FileName = "";
  282. bool result = false;
  283. try
  284. {
  285. int[] pageArray = pageIndexLists.ToArray();
  286. imgConverter = new CPDFConverterImg(inputpath, pawssword);
  287. string outputFolder = outputpath;
  288. string outputFileName = Path.GetFileNameWithoutExtension(inputpath);
  289. ConvertError error = ConvertError.ERR_UNKNOWN;
  290. if (imageType == ".png" || imageType == ".jpg")
  291. {
  292. result = await Task.Run(() => imgConverter.Convert(outputFolder, ref outputFileName, imgOptions, pageArray, ref error, getProgress));
  293. FileName = CommonHelper.CreateFolder(outputFileName.Replace(".zip", ""));
  294. ZipFile.ExtractToDirectory(outputFileName, FileName);
  295. FileInfo file = new FileInfo(outputFileName);
  296. if (file.Exists) { file.Delete(); }
  297. }
  298. else
  299. { //创建缓存文件夹
  300. string folderPath = Path.Combine(App.CurrentPath, "ConverterImg");
  301. //有可能因为其他原因存在同名文件,导致创建文件夹失败,需要先删除同名文件
  302. //保险措施(猜测)
  303. if (File.Exists(folderPath))
  304. {
  305. File.Delete(folderPath);
  306. }
  307. DirectoryInfo tempfolder = new DirectoryInfo(folderPath);
  308. if (!tempfolder.Exists)
  309. {
  310. tempfolder.Create();
  311. }
  312. //预览图缓存
  313. string saveName = Guid.NewGuid().ToString();
  314. string savePath = Path.Combine(folderPath, saveName);
  315. result = await Task.Run(() => imgConverter.Convert(folderPath, ref saveName, imgOptions, pageArray, ref error, getProgress));
  316. ImageMagickPDFToImage(imageType, saveName, outputFolder, outputFileName, ref FileName, imgOptions.ImageDpi);
  317. DirectoryInfo di = new DirectoryInfo(folderPath);
  318. di.Delete(true);
  319. }
  320. if (result)
  321. {
  322. //Process.Start(FileName.Replace("/", "\\"));
  323. CommonHelper.ShowFileBrowser(FileName.Replace("/", "\\"));
  324. }
  325. }
  326. catch (Exception ex)
  327. {
  328. }
  329. return result;
  330. }
  331. public static async Task<bool> RTFConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, CPDFConvertRTFOptions rtfOptions = null, bool IsCustomFileName = true)
  332. {
  333. bool result = false;
  334. try
  335. {
  336. int[] pageArray = pageIndexLists.ToArray();
  337. rtfConverter = new CPDFConverterRTF(inputpath, pawssword);
  338. string outputFolder = outputpath.Remove(outputpath.LastIndexOf("\\"));
  339. string outputFileName = Path.GetFileNameWithoutExtension(outputpath);
  340. ConvertError error = ConvertError.ERR_UNKNOWN;
  341. result = await Task.Run(() => rtfConverter.Convert(outputFolder, ref outputFileName, rtfOptions, pageArray, ref error, getProgress));
  342. if (result)
  343. {
  344. if (!String.IsNullOrEmpty(outputFileName) && File.Exists(outputFileName.Replace("/", "\\")))
  345. {
  346. CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
  347. }
  348. }
  349. }
  350. catch (Exception ex)
  351. {
  352. }
  353. return result;
  354. }
  355. public static async Task<bool> HTMLConvert(string inputpath, string outputpath, OnProgress getProgress, List<int> pageIndexLists, string pawssword, CPDFConvertHTMLOptions HtmlOption, bool IsCustomFileName = true)
  356. {
  357. bool result = false;
  358. try
  359. {
  360. htmlConverter = new CPDFConverterHTML(inputpath, pawssword);
  361. int[] pageArray = pageIndexLists.ToArray();
  362. string outputFolder = outputpath.Remove(outputpath.LastIndexOf("\\"));
  363. string outputFileName = Path.GetFileNameWithoutExtension(outputpath);
  364. ConvertError error = ConvertError.ERR_UNKNOWN;
  365. result = await Task.Run(() => htmlConverter.Convert(outputFolder, ref outputFileName, HtmlOption, pageArray, ref error, getProgress));
  366. if (result)
  367. {
  368. if (!String.IsNullOrEmpty(outputFileName) && File.Exists(outputFileName.Replace("/", "\\")))
  369. {
  370. CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
  371. }
  372. }
  373. }
  374. catch (Exception ex)
  375. {
  376. }
  377. return result;
  378. }
  379. public static void Clear(string ConvertType)
  380. {
  381. switch (ConvertType)
  382. {
  383. case "Word":
  384. if (wordConverter != null)
  385. {
  386. wordConverter.Cancel();
  387. }
  388. break;
  389. case "Excel":
  390. if (excelConverter != null)
  391. {
  392. excelConverter.Cancel();
  393. }
  394. break;
  395. case "PPT":
  396. if (pptConverter != null)
  397. {
  398. pptConverter.Cancel();
  399. }
  400. break;
  401. case "Text":
  402. if (txtConverter != null)
  403. {
  404. txtConverter.Cancel();
  405. }
  406. break;
  407. case "CSV":
  408. if (csvConverter != null)
  409. {
  410. csvConverter.Cancel();
  411. }
  412. break;
  413. case "RTF":
  414. if (rtfConverter != null)
  415. {
  416. rtfConverter.Cancel();
  417. }
  418. break;
  419. case "HTML":
  420. if (htmlConverter != null)
  421. {
  422. htmlConverter.Cancel();
  423. }
  424. break;
  425. case "Img":
  426. if (imgConverter != null)
  427. {
  428. imgConverter?.Cancel();
  429. }
  430. break;
  431. default:
  432. break;
  433. }
  434. }
  435. private static void StartFile(string path)
  436. {
  437. //Process.Start(path);
  438. }
  439. public static string GetFileNameAddSuffix(string path, string filename, string suffix)
  440. {
  441. int i = 1;
  442. string outname = filename;
  443. while (File.Exists(path + @"\" + outname + suffix))
  444. {
  445. outname = filename + $"({i.ToString()})";
  446. i++;
  447. }
  448. return outname;
  449. }
  450. public static Microsoft.Office.Interop.Word.Application word;
  451. public static Microsoft.Office.Interop.Excel.Application excele;
  452. public static Microsoft.Office.Interop.PowerPoint.Application ppt;
  453. public static string ConvertOfficeToPDF(string sourcepath, Microsoft.Office.Interop.Word.WdPaperSize paperSize = Microsoft.Office.Interop.Word.WdPaperSize.wdPaperA4, double margin = 0)
  454. {
  455. string folderPath = Path.GetTempPath();
  456. if (File.Exists(folderPath))
  457. {
  458. File.Delete(folderPath);
  459. }
  460. DirectoryInfo tempfolder = new DirectoryInfo(folderPath);
  461. if (!tempfolder.Exists)
  462. {
  463. tempfolder.Create();
  464. }
  465. string targetPath = System.IO.Path.Combine(folderPath, Guid.NewGuid().ToString() + ".pdf");
  466. string ex = System.IO.Path.GetExtension(sourcepath).ToLower();
  467. switch (ex)
  468. {
  469. case ".doc":
  470. case ".docx":
  471. case "docm":
  472. case ".dot":
  473. case ".dotx":
  474. case ".dotm":
  475. case ".txt":
  476. case ".html":
  477. if (word == null)
  478. {
  479. word = new Microsoft.Office.Interop.Word.Application();
  480. }
  481. word.Visible = false;
  482. word.ShowWindowsInTaskbar = true;
  483. Microsoft.Office.Interop.Word.Document document = word.Documents.Open(sourcepath);
  484. var page = document.PageSetup;
  485. page.PaperSize = paperSize;
  486. if (margin > 0)
  487. {
  488. page.LeftMargin = page.TopMargin = page.RightMargin = page.BottomMargin = (float)margin;
  489. }
  490. document?.ExportAsFixedFormat(targetPath, Microsoft.Office.Interop.Word.WdExportFormat.wdExportFormatPDF);
  491. document?.Close(false);
  492. if (word != null)
  493. {
  494. word.NormalTemplate.Saved = true;
  495. //word.Quit();
  496. }
  497. break;
  498. case ".xls":
  499. case ".xlsx":
  500. case ".xlsm":
  501. case ".xlsb":
  502. case ".xlam":
  503. case ".xltx":
  504. case ".xlt":
  505. if (excele == null)
  506. {
  507. excele = new Microsoft.Office.Interop.Excel.Application();
  508. }
  509. Microsoft.Office.Interop.Excel.Workbook workbook = null;
  510. excele.Visible = false;
  511. try
  512. {
  513. workbook = excele.Workbooks.Open(sourcepath);
  514. }
  515. catch (Exception e)
  516. {
  517. workbook = excele.Workbooks.Open(sourcepath, 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "t", false, false, 0, true, 1, Microsoft.Office.Interop.Excel.XlCorruptLoad.xlRepairFile);
  518. }
  519. workbook?.ExportAsFixedFormat(Microsoft.Office.Interop.Excel.XlFixedFormatType.xlTypePDF, targetPath);
  520. workbook?.Close();
  521. //excele?.Quit();
  522. break;
  523. case ".ppt":
  524. case ".pptx":
  525. case ".pptm":
  526. case ".pptsx":
  527. case ".pps":
  528. case ".pptsm":
  529. case ".pot":
  530. case ".potm":
  531. if (ppt == null)
  532. {
  533. ppt = new Microsoft.Office.Interop.PowerPoint.Application();
  534. }
  535. Microsoft.Office.Interop.PowerPoint.Presentation presentation = null;
  536. //ppt.Visible = Microsoft.Office.Core.MsoTriState.msoCTrue;
  537. //ppt.ShowStartupDialog = Microsoft.Office.Core.MsoTriState.msoFalse;
  538. //ppt.ShowWindowsInTaskbar = Microsoft.Office.Core.MsoTriState.msoFalse;
  539. presentation = ppt.Presentations.Open(sourcepath);
  540. presentation.ExportAsFixedFormat(targetPath, Microsoft.Office.Interop.PowerPoint.PpFixedFormatType.ppFixedFormatTypePDF);
  541. presentation?.Close();
  542. //ppt?.Quit();
  543. break;
  544. }
  545. return targetPath;
  546. }
  547. /// <summary>
  548. /// 转档解锁跳转
  549. /// </summary>
  550. public static void convertUnlock()
  551. {
  552. }
  553. }
  554. }