PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.com/

image.Elements.GetName("/Filter") -- Exception
http://forum.pdfsharp.com/viewtopic.php?f=2&t=4012
Page 1 of 1

Author:  drmac [ Wed Sep 04, 2019 10:17 am ]
Post subject:  image.Elements.GetName("/Filter") -- Exception

Hi!
Sorry if this kind of issue is already solved. I couldn't find it in reasonable time...

When I try to decode this pdf (in link provided) file I got exception:
"Object reference not set to an instance of an object."

I can't figure it out why this is happening. Any help would be appreciated. Thanks!

Pdf: https://www.mediafire.com/file/xth0k0rz ... K.pdf/file

Here are screenshots also:
Image

Image

Author:  Thomas Hoevel [ Wed Sep 04, 2019 2:23 pm ]
Post subject:  Re: image.Elements.GetName("/Filter") -- Exception

Maybe "/Filter" is an array and not a single string.

Maybe this post helps:
viewtopic.php?p=5587#p5587

Author:  drmac [ Mon Sep 09, 2019 8:28 am ]
Post subject:  Re: image.Elements.GetName("/Filter") -- Exception

Thanks!

It solved my problem!

Before calling string filter = image.Elements.GetName("/Filter"), I iterate with foreach trough image.Elements.Values and if value.isArray() I used same function as /DCTDecode for extraction.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/