Next we create an ABCpdf Doc object.
When we add our image it will be scaled to fit the current rect
so it is important that we adjust the rect to reflect the dimensions
of our image. Here we assume a one to one ratio between pixels and
points which will give us a 72 dpi result when printed.
[C#]
Doc theDoc = new Doc();
theDoc.Rect.Left = 100;
theDoc.Rect.Bottom = 100;
theDoc.Rect.Width = theImg.Width;
theDoc.Rect.Height = theImg.Height;
theDoc.AddImageObject(theImg, false);
theDoc.Save(Server.MapPath("image.pdf"));
theDoc.Clear();
[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.Rect.Left = 100
theDoc.Rect.Bottom = 100
theDoc.Rect.Width = theImg.Width
theDoc.Rect.Height = theImg.Height
theDoc.AddImageObject(theImg, false)
theDoc.Save(Server.MapPath("image.pdf"))
theDoc.Clear()
|