GemBox Support Forum

Unable to cast object of type 'GemBox.Pdf.Objects.PdfStream' to type 'GemBox.Pdf.Objects.PdfBasicCollection'


I would like to know if anyone encounter this error before?
I am trying to add watermark to a PDF file which I uploaded. This PDF file was created through Adobe illustration. But I get the error below -

Unable to cast object of type ‘GemBox.Pdf.Objects.PdfStream’ to type ‘GemBox.Pdf.Objects.PdfBasicCollection’.

Please help.


Unfortunately, I was unable to reproduce this issue.

Please create a small Visual Studio project that reproduces this and send it to us by submitting a support ticket.

We’ll investigate the issue and contact you again after it’s been resolved.