|
@@ -59,17 +59,17 @@ namespace PDF_Office.Model.Dialog.ToolsDialogs
|
|
|
App.mainWindowViewModel.ProgressTitle = "Compressing";
|
|
|
App.mainWindowViewModel.IsProcessVisible = System.Windows.Visibility.Visible;
|
|
|
App.mainWindowViewModel.MaxValue = doc.PageCount;
|
|
|
- CPDFDocument document = CPDFDocument.InitWithFilePath(doc.FilePath);
|
|
|
- document.UnlockWithPassword(password);
|
|
|
+ //CPDFDocument document = CPDFDocument.InitWithFilePath(doc.FilePath);
|
|
|
+ doc.UnlockWithPassword(password);
|
|
|
indexDelegate += GetIndex;
|
|
|
- compressingIntpr = document.CompressFile_Init(compressquality, indexDelegate);
|
|
|
+ compressingIntpr = doc.CompressFile_Init(compressquality, indexDelegate);
|
|
|
//GC.KeepAlive(indexDelegate);
|
|
|
- tempDocument = document;
|
|
|
+ tempDocument = doc;
|
|
|
Trace.WriteLine("compressDialogModel.CompressQuality" + compressquality);
|
|
|
App.mainWindowViewModel.ProcessCloseAction = CompressClear;
|
|
|
- await Task.Run<bool>(() => { return document.CompressFile_Start(compressingIntpr, filepath); });
|
|
|
+ await Task.Run<bool>(() => { return doc.CompressFile_Start(compressingIntpr, filepath); });
|
|
|
CommonHelper.ShowFileBrowser(filepath);
|
|
|
- document.Release();
|
|
|
+ doc.Release();
|
|
|
}
|
|
|
}
|
|
|
}
|