draw image in the PDF file

draw image in the PDF file

Forum member · Jan 28, 2008
Hello all, I am using Version - 1.6.1.0 of the Dynamic PDF generator. I want to add image to the Page element, I am writing following code : Page oPage = new Page( PageSize.A4, PageOrientation.Portrait,36.0f ); ceTe.DynamicPDF.PageElements.Image image = new Image(@"C:\logo.gif", ImageCompression.DeflateEncode ,0,15,0); oPage.Elements.Add( image ); There is other piece of code for writing text. But when I compile this code, it is giving me error on my image (line of code) : "The type 'System.Drawing.Bitmap' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Drawing'." Can anyone help me what is wrong in the above line of code, or how can I add image in my pdf. Please remember the version. I have the path for the image file, I want to show it from there. I want a very quick response as we have a release in coming week. Thanks in advance. Bhupali Dhoble.

Re: draw image in the PDF file

Support · Jan 28, 2008
Hello Bhupali, Our product uses the System.Drawing.Bitmap class internally When adding images to the PDF document. Please try adding the reference to the System.Drawing dll in your project and add an import (or using) statement for this namespace in your code and it will solve your problem. Thanks, ceTe Software Support Team.