示例#1
0
        public void OnTargetTextChanged(int page, string text)
        {
            var p = CreateOrGetPage(page);

            p.TargetText = text;
            HasSave      = false;
            PdfiumPageEvent?.Invoke(p);
        }
示例#2
0
        public void OnPageToText(int page)
        {
            var p = CreateOrGetPage(page);

            p.SourceText = GetPDFText(page);
            HasSave      = false;

            PdfiumPageEvent?.Invoke(p);
        }
示例#3
0
        public void OnDisplayRectangleChanged(int page)
        {
            var p = CreateOrGetPage(page);

            if (!p.Translated && TranslateCurrentPage)
            {
                AddTranslatePage(page);
            }
            PdfiumPageEvent?.Invoke(p);
        }
示例#4
0
        private void TranslateWorker()
        {
            int        page;
            PdfiumPage p = null;

            while (_queue.TryDequeue(out page))
            {
                HasSave = false;
                PdfiumPageTranslateBegin?.Invoke();

                p = _pages[page];
                TranslatePage(p);

                PdfiumPageEvent?.Invoke(p);
            }

            _translate = null;
            PdfiumPageTranslateEnd?.Invoke();
        }