1234567891011121314151617181920212223242526272829303132 |
- using ComPDFKit.PDFDocument;
- using Compdfkit_Tools.Helper;
- using ComPDFKitViewer.PdfViewer;
- using System.Windows.Controls;
- namespace Compdfkit_Tools.PDFControl
- {
- public partial class CPDFAbstractInfoControl : UserControl
- {
- public CPDFViewer pdfViewer;
- public void InitWithPDFViewer(CPDFViewer pdfViewer)
- {
- this.pdfViewer = pdfViewer;
- InitializeAbstractInfo(pdfViewer.Document);
- }
- public CPDFAbstractInfoControl()
- {
- InitializeComponent();
- }
- private void InitializeAbstractInfo(CPDFDocument cpdfDocument)
- {
- FileNameTextBlock.Text = cpdfDocument.FileName;
- FileSizeTextBlock.Text = CommonHelper.GetFileSize(cpdfDocument.FilePath);
- TitleTextBlock.Text = cpdfDocument.GetInfo().Title;
- AuthorTextBlock.Text = cpdfDocument.GetInfo().Author;
- SubjectTextBlock.Text = cpdfDocument.GetInfo().Subject;
- KeywordTextBlock.Text = cpdfDocument.GetInfo().Keywords;
- }
- }
- }
|