示例#1
0
        public IEnumerable <IPdfImage> GetImages()
        {
            foreach (var image in images)
            {
                var result = image.Match <IPdfImage>(x => XObjectFactory.ReadImage(x, pdfScanner, filterProvider, resourceStore),
                                                     x => x);

                yield return(result);
            }
        }
示例#2
0
 public void AddXObject(XObjectContentRecord xObject,
                        IPdfTokenScanner scanner,
                        ILookupFilterProvider filterProvider,
                        IResourceStore resourceStore)
 {
     if (top != null && xObject.Type == XObjectType.Image)
     {
         var image = XObjectFactory.ReadImage(xObject, scanner, filterProvider, resourceStore);
         top?.AddImage(image);
     }
 }
示例#3
0
        public IEnumerable <IPdfImage> GetImages()
        {
            foreach (var image in images)
            {
                IPdfImage result = null;
                image.Match(x => { result = XObjectFactory.ReadImage(x, pdfScanner, filterProvider, resourceStore, isLenientParsing); },
                            x => { result = x; });

                yield return(result);
            }
        }
示例#4
0
 public IEnumerable <IPdfImage> GetImages()
 {
     foreach (var image in images)
     {
         if (image.TryGetFirst(out var xObjectContentRecord))
         {
             yield return(XObjectFactory.ReadImage(xObjectContentRecord, pdfScanner, filterProvider, resourceStore));
         }
         else if (image.TryGetSecond(out var inlineImage))
         {
             yield return(inlineImage);
         }
     }
 }