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.
Up arrow icon