Ejemplo n.º 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="pdfFile">The pdf file to be operating</param>
 public TableLocator(string pdfFile)
 {
     _pdfFile = pdfFile;
     pdfDoc   = new PDFDoc(_pdfFile);
     pdfDoc.InitSecurityHandler();
     pdfTronHelper     = new PdfTronHelper(pdfDoc);
     IsConsolidated    = true;
     ConsolidatedFound = true;
     ParentFound       = true;
 }
Ejemplo n.º 2
0
        void CreateTablePosHighlight(TablePos tablePos, PDFDoc pdfDoc)
        {
            double lineWidth = 3;

            Page page = pdfDoc.GetPage(tablePos.PageNum);

            foreach (FormLine line in tablePos.HorizontialLines.Concat(tablePos.VerticalLines).SelectMany(pair => pair.Value))
            {
                lineWidth = line.IsExistent ? 3 : 1;

                Rect rect = line.IsTransverseLine ? new Rect(line.StartPoint.x, line.StartPoint.y, line.EndPoint.x, line.StartPoint.y + lineWidth) :
                            new Rect(line.StartPoint.x, line.StartPoint.y, line.StartPoint.x + lineWidth, line.EndPoint.y);
                PdfTronHelper pdfTronHelper = new PdfTronHelper(pdfDoc);
                pdfTronHelper.RevertTransportRect(tablePos.PageNum, rect);
                CreateHighlight(pdfDoc, page, rect);
            }
        }