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); } }
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); } }
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); } }
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); } } }