Example #1
0
        void worker_DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker worker = sender as BackgroundWorker;

              PDFContentHelper pdfHelper = new PDFContentHelper(document.FileName);
              //Search for the term "figure" in document
              foreach (Figure figure in listOfFigures)
              {
            List<ContentLocation> linksForFigure = pdfHelper.ContentToPixel(figure.TriggerText[1], -1, document.DocumentSize.Width, document.DocumentSize.Height);
            worker.ReportProgress(++index * 100 / listOfFigures.Count, new Object[] { figure, linksForFigure });
            //worker.ReportProgress(++index * 100 / listOfFigures.Count, new Object[] { figure, new List<ContentLocation>() });
              }
        }