public FindDouHeaderFooter(IdentifyTablesData tables, ProcessImageData images, HeaderFooterData headerFooterData)
        {
            this._headerFooterData = headerFooterData;
            this._lines            = tables.PageLines;
            this._images           = images.Images;

            if (_lines == null || _images == null)
            {
                PdfReaderException.AlwaysThrow("FindDouHeaderFooter requires both IdentifyTablesData and ProcessImageData");
            }
        }
Example #2
0
        public RemoveImageLineFromHeaderFooter(HeaderFooterData data, ProcessImageData imageData, IdentifyTablesData tablesData)
        {
            this._headerH    = data.HeaderH;
            this._footerH    = data.FooterH;
            this._imageData  = imageData;
            this._tablesData = tablesData;

            if (float.IsNaN(_headerH) || float.IsNaN(_footerH))
            {
                PdfReaderException.AlwaysThrow("RemoveImageLineFromHeaderFooter requires HeaderFooterData");
            }
        }
        void FindMargins(IEnumerable <IBlock> images, TableCell footer, HeaderFooterData headerFooterData)
        {
            var header = FindTopImage(images);

            if (header != null)
            {
                headerFooterData.HeaderH = header.GetH();
            }
            else
            {
                headerFooterData.HeaderH = float.MaxValue;
                PdfReaderException.Warning("There is no image defining the header");
            }

            if (footer != null)
            {
                headerFooterData.FooterH = footer.GetH();
            }
            else
            {
                headerFooterData.FooterH = float.MinValue;
                PdfReaderException.Warning("There is no (table) line defining the footer");
            }
        }