Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Can't add images/XObjects

Help
master2080
2012-07-02
2013-01-26
  • master2080
    master2080
    2012-07-02

    Hello,

    I was trying to get an image on a PDF page but I always get the null reference exception.
    I tried using different examples and samples you provided but all return the exception.
    For example in the ImageSubstitutionSample theres a line that goes:

    Xobject imageXObject=image.ToXObject(document);
    

    and it returns the null exception.
    Another one I tried was the InlineObjectSample and I'm getting the exception at:

    image.ToInlineObject(composer);
    

    I just wanted to test if this code works so I did not change a thing(besides the image path) yet it doesn't work.
    Can anyone help me out?

    Thanks !