Newbie with this software (looking really good so far) and asp.net with c# so forgive ignorance....
I've managed to add the helloworld example to my project and can invoke the page, all works fine. When i try and cut 'n paste into one of my existing pages i get the above error when i try and build. I've included the using "ceTe.DynamicPDF;" and the "using ceTe.DynamicPDF.PageElements;"
at the top and basicaly have a button that invokes a method as below...
.
.
.
private void btnPrint_Click(object sender, System.EventArgs e)
{
printHelloWorld();
}
private void printHelloWorld()
{
// Save and Print Quotation
// Create a document and set it's properties
ceTe.DynamicPDF.Document document = new ceTe.DynamicPDF.Document();
document.Creator = "HelloWorld.aspx";
document.Author = "Hello World System";
document.Title = "Hello World";
// Create a page to add to the document
ceTe.DynamicPDF.Page page = new ceTe.DynamicPDF.Page( PageSize.A4, PageOrientation.Portrait, 54.0f );
// Create Header
Rectangle rectangle = new Rectangle (0, 0, 500, 55, Color.SlateGray, bGColor, Apply.Both, 0.5f );
page.Elements.Add( rectangle );
any ideas ??
thanks
Steve
C:\Inetpub\wwwroot\guideline\quotePrint.aspx.cs(784): 'Rectangle' is an ambiguous reference
Re: C:\Inetpub\wwwroot\guideline\quotePrint.aspx.cs(784): 'Rectangle' is an ambiguous reference
Support · Jan 27, 2006The reason you are getting this error is because the object 'Rectangle' is defined twice in the scope of your application, once is in the ceTe.DynamicPDF.PageElements namespace and the other is most likely in the System.Drawing namespace. Anytime this happens all you will need to do is qualify any possibly conflicting names with there full name. So just change the line:
Rectangle rectangle = new Rectangle (0, 0,...
to:
ceTe.DynamicPDF.PageElements.Rectangle rectangle = new ceTe.DynamicPDF.PageElements.Rectangle (0, 0,...
That should do it for you...have fun with the product.
Thanks,
ceTe Software Support Team