I think I am a little dense here because I cannot seem to figure out how to properly use the FilterWriter in this situation.
I want to get the embedded image of a PDF directly into a byte array(I’ll take any format, png, tiff, original, whatever) and I cannot seem to figure it out.
I have the following:
var image = new pdftron.PDF.Image(element.GetXObject());
FilterWriter fw = new FilterWriter();
image.ExportAsTiff(fw);
Of course if I change ExportAsTiff to a file it works fine, but when I do it this way, anything I try to do with the FilterWriter(fw) causes a protected memory error. I’m sorry I can’t figure this out as I know it is probably simple, but the FilterWriter vs. FilterReader just seem to consistently confuse me and ExportAsTiff only returns a FilterWriter.