You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clearly this file has an image yet pdfpg does not find it:
using var doc = PdfDocument.Open(path);
var page = doc.GetPage(1);
Console.WriteLine(page.NumberOfImages); // 0
I dug into this a bit, and I believe the reason is that the image is being referenced via a "cs" operator (SetNonStrokeColorSpace) which references /Resources/Pattern and ultimately the image.
It would be cool if PdfPig could detect images referenced in this way!
The text was updated successfully, but these errors were encountered:
@mikethea1 I had a look and you are correct, the image is inside the Pattern color. I think this is a bit of a corner case and it might not be beneficial to the library to include those.
You can still extract them relatively easily though by implementing your own ContentStreamProcessor. I'll try to create a sample to show you how to achieve that. If there's not real performance cost, we might include that in the cor library
Here is the file of interest:
repro_p1.pdf
Clearly this file has an image yet pdfpg does not find it:
I dug into this a bit, and I believe the reason is that the image is being referenced via a "cs" operator (SetNonStrokeColorSpace) which references /Resources/Pattern and ultimately the image.
It would be cool if PdfPig could detect images referenced in this way!
The text was updated successfully, but these errors were encountered: