|
@@ -75,7 +75,7 @@ namespace PRSDesktop
|
|
|
/// <summary>
|
|
|
/// Interaction logic for ScanPanel.xaml
|
|
|
/// </summary>
|
|
|
- public partial class ScanPanel : UserControl, ICorePanel
|
|
|
+ public partial class ScanPanel : UserControl, ICorePanel, IDockPanel
|
|
|
{
|
|
|
private List<Scan> SelectedScans = new();
|
|
|
private Type? appliesTo;
|
|
@@ -127,17 +127,18 @@ namespace PRSDesktop
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private List<byte[]> RenderTextFile(string textData)
|
|
|
+ private static List<byte[]> RenderTextFile(string textData)
|
|
|
{
|
|
|
var pdfDocument = new PdfDocument();
|
|
|
var page = pdfDocument.Pages.Add();
|
|
|
- var graphics = page.Graphics;
|
|
|
|
|
|
var font = new PdfStandardFont(PdfFontFamily.Courier, 14);
|
|
|
var textElement = new PdfTextElement(textData, font);
|
|
|
- var layoutFormat = new PdfLayoutFormat();
|
|
|
- layoutFormat.Layout = PdfLayoutType.Paginate;
|
|
|
- layoutFormat.Break = PdfLayoutBreakType.FitPage;
|
|
|
+ var layoutFormat = new PdfLayoutFormat
|
|
|
+ {
|
|
|
+ Layout = PdfLayoutType.Paginate,
|
|
|
+ Break = PdfLayoutBreakType.FitPage
|
|
|
+ };
|
|
|
|
|
|
textElement.Draw(page, new RectangleF(0, 0, page.GetClientSize().Width, page.GetClientSize().Height), layoutFormat);
|
|
|
|