feat: rebrand to MMD PDF, single corporate theme, and remove original text under an edit
- Services/PdfRedactText.cs: strip text whose origin falls inside a CoverAnnotation from the page content stream at save time, hooked into PdfBurn.DrawAnnotationsIntoDoc. Fixes edited values staying recoverable by text extraction. - Themes/MMD.xaml replaces all thirteen themes; picker and accent strip removed; no dark mode. - Rename KillerPDF -> MMD PDF across code, resources, packaging and locale strings; new icon. - Remove the upstream author credit and the in-app install button.
This commit is contained in:
@@ -9,14 +9,14 @@ using Microsoft.Win32;
|
||||
using PdfSharpCore.Drawing;
|
||||
using PdfSharpCore.Pdf;
|
||||
using PdfSharpCore.Pdf.IO;
|
||||
using KillerPDF.Services;
|
||||
using MmdPdf.Services;
|
||||
|
||||
namespace KillerPDF.Features
|
||||
namespace MmdPdf.Features
|
||||
{
|
||||
/// <summary>
|
||||
/// The four OCR operations that work on the open document: page to clipboard, region to
|
||||
/// clipboard, searchable PDF, and extract-all-text. Moved out of Ocr.cs (MainWindow) in the
|
||||
/// KillerUI refactor.
|
||||
/// MmdPdfUI refactor.
|
||||
///
|
||||
/// Holds no controls. Talks to the window only through <see cref="IOcrHost"/>, so the whole
|
||||
/// of this file is testable against a stub host. The pure language/download helpers live in
|
||||
@@ -84,7 +84,7 @@ namespace KillerPDF.Features
|
||||
catch (Exception ex)
|
||||
{
|
||||
_host.HideBusy();
|
||||
KillerDialog.Show(_host.Window, _host.Loc("Str_Err_OcrFailed") + "\n" + ex.Message, "KillerPDF",
|
||||
KillerDialog.Show(_host.Window, _host.Loc("Str_Err_OcrFailed") + "\n" + ex.Message, "MmdPdf",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
finally
|
||||
@@ -141,7 +141,7 @@ namespace KillerPDF.Features
|
||||
catch (Exception ex)
|
||||
{
|
||||
_host.HideBusy();
|
||||
KillerDialog.Show(_host.Window, _host.Loc("Str_Err_OcrFailed") + "\n" + ex.Message, "KillerPDF", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
KillerDialog.Show(_host.Window, _host.Loc("Str_Err_OcrFailed") + "\n" + ex.Message, "MmdPdf", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -173,7 +173,7 @@ namespace KillerPDF.Features
|
||||
if (!await _host.EnsureOcrModelsReadyAsync()) return;
|
||||
_host.CommitActiveTextBox();
|
||||
|
||||
var dlg = new KillerPDF.Controls.FileDialog(KillerPDF.Controls.FileDialogMode.Save)
|
||||
var dlg = new MmdPdf.Controls.FileDialog(MmdPdf.Controls.FileDialogMode.Save)
|
||||
{
|
||||
Filter = _host.Loc("Str_Filter_Pdf") + "|*.pdf",
|
||||
Title = _host.Loc("Str_Ocr_SaveSearchable"),
|
||||
@@ -190,7 +190,7 @@ namespace KillerPDF.Features
|
||||
try { _host.SaveDocumentTo(src); }
|
||||
catch (Exception ex)
|
||||
{
|
||||
KillerDialog.Show(_host.Window, _host.Loc("Str_Err_PrepareDoc") + "\n" + ex.Message, "KillerPDF",
|
||||
KillerDialog.Show(_host.Window, _host.Loc("Str_Err_PrepareDoc") + "\n" + ex.Message, "MmdPdf",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
return;
|
||||
}
|
||||
@@ -208,12 +208,12 @@ namespace KillerPDF.Features
|
||||
_host.SetStatus(string.Format(_host.Loc("Str_St_SearchableSaved"), pages, words));
|
||||
KillerDialog.Show(_host.Window,
|
||||
string.Format(_host.Loc("Str_Dlg_SearchableSaved"), outPath, pages, words),
|
||||
"KillerPDF", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
"MmdPdf", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_host.HideBusy();
|
||||
KillerDialog.Show(_host.Window, _host.Loc("Str_Err_SearchableFailed") + "\n" + ex.Message, "KillerPDF",
|
||||
KillerDialog.Show(_host.Window, _host.Loc("Str_Err_SearchableFailed") + "\n" + ex.Message, "MmdPdf",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
finally
|
||||
@@ -311,7 +311,7 @@ namespace KillerPDF.Features
|
||||
if (!await _host.EnsureOcrModelsReadyAsync()) return;
|
||||
_host.CommitActiveTextBox();
|
||||
|
||||
var dlg = new KillerPDF.Controls.FileDialog(KillerPDF.Controls.FileDialogMode.Save)
|
||||
var dlg = new MmdPdf.Controls.FileDialog(MmdPdf.Controls.FileDialogMode.Save)
|
||||
{
|
||||
Filter = _host.Loc("Str_Filter_Text") + "|*.txt|Markdown|*.md",
|
||||
Title = _host.Loc("Str_Ocr_ExtractAllText"),
|
||||
@@ -328,7 +328,7 @@ namespace KillerPDF.Features
|
||||
try { _host.SaveDocumentTo(src); pageCount = _host.PageCount; }
|
||||
catch (Exception ex)
|
||||
{
|
||||
KillerDialog.Show(_host.Window, _host.Loc("Str_Err_PrepareDoc") + "\n" + ex.Message, "KillerPDF",
|
||||
KillerDialog.Show(_host.Window, _host.Loc("Str_Err_PrepareDoc") + "\n" + ex.Message, "MmdPdf",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
return;
|
||||
}
|
||||
@@ -348,7 +348,7 @@ namespace KillerPDF.Features
|
||||
catch (Exception ex)
|
||||
{
|
||||
_host.HideBusy();
|
||||
KillerDialog.Show(_host.Window, _host.Loc("Str_Err_ExtractFailed") + "\n" + ex.Message, "KillerPDF",
|
||||
KillerDialog.Show(_host.Window, _host.Loc("Str_Err_ExtractFailed") + "\n" + ex.Message, "MmdPdf",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in New Issue
Block a user