Exemple #1
0
        public BlockPage Process(BlockPage page)
        {
            var overlappedImages = FindInlineElements(page);

            foreach (var image in overlappedImages.AllBlocks)
            {
                _parse.RemoveImage(image);
            }

            var blocks = page.AllBlocks.Except(overlappedImages.AllBlocks);

            var result = new BlockPage();

            result.AddRange(blocks);

            return(result);
        }
        public BlockPage Process(BlockPage page)
        {
            var overlappedImages = FindInlineElements(page);

            foreach (var image in overlappedImages.AllBlocks)
            {
                if (!(image is ImageBlock))
                {
                    PdfReaderException.AlwaysThrow("RemoveOverlapedImages2 should be used only with images");
                }

                _parse.RemoveImage(image);
            }

            var blocks = page.AllBlocks.Except(overlappedImages.AllBlocks);

            var result = new BlockPage();

            result.AddRange(blocks);

            return(result);
        }