We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

IPDFIMAGE

These code gives me an Error.

"Value cannot be null.
Parameter name: obj"

Dim i1 As Image = Image.FromFile("C:\Picture 002.jpg")

''Below Line Creates the Error?
Dim m As IPDFImage = doc.CreatePDFImage(i1)

Dim r As New RectangleF(0, 0, doc.LastPage.DrawingWidth, doc.LastPage.DrawingHeight)
doc.LastPage.Graphics.DrawImage(New Point(0, 0), m, doc.LastPage.Size, props, r)

1 Reply

JK Jody Kelsch August 23, 2006 03:02 PM UTC

I Figured it Out

Dim m As IPDFImage = doc.LastPage.Graphics.CreatePdfImage(i1)

fixed the Problem

>These code gives me an Error.

"Value cannot be null.
Parameter name: obj"

Dim i1 As Image = Image.FromFile("C:\Picture 002.jpg")

''Below Line Creates the Error?
Dim m As IPDFImage = doc.CreatePDFImage(i1)

Dim r As New RectangleF(0, 0, doc.LastPage.DrawingWidth, doc.LastPage.DrawingHeight)
doc.LastPage.Graphics.DrawImage(New Point(0, 0), m, doc.LastPage.Size, props, r)

Loader.
Live Chat Icon For mobile
Up arrow icon