I got the following exception :
To be XML serializable, types which inherit from IEnumerable must have an implementation of Add(System.Object) at all levels of their inheritance hierarchy. MigraDoc.DocumentObjectModel.Borders does not implement Add(System.Object).
I am using
http://www.pdfsharp.net/wiki/Invoice-sample.ashx this page to create the same page as it is creating. But when I use
Code:
public Document CreateDocument()
{
// Create a new MigraDoc document
this.document = new Document();
this.document.Info.Title = "A sample invoice";
this.document.Info.Subject = "Demonstrates how to create an invoice.";
this.document.Info.Author = "Stefan Lange";
DefineStyles();
CreatePage();
FillContent();
return this.document;
}
It return the specified error and when I did not return the document everything is good but it will not create pdf file. I am new to this , So please tell me how can I fix it?
Document is using MigraDoc.DocumentObjectModel .
Thanks