Thank you for your reply.
Actullay my string is dynamic so it may fit more than one page.
I can use the string directly as you say.
I looked at MigraDoc using in the link u sent , but my code coundt find the referance of "PdfDocumentRenderer"
What can simply I do for writing more pages.
The sample ise below.It just writes only one page!
Code:
string filename ="abc.pdf";
PdfDocument document = new PdfDocument();
PdfPage page = document.AddPage();
XGraphics gfx = XGraphics.FromPdfPage(page);
XFont font = new XFont("Lucida Console", 6, XFontStyle.Regular);
XTextFormatter tf = new XTextFormatter(gfx);
XRect rect = new XRect(20, 20, 575, 870);
//gfx.DrawRectangle(XBrushes.SeaShell, rect);
tf.Alignment = XParagraphAlignment.Left;
tf.DrawString(str , font, XBrushes.Black, rect, XStringFormats.TopLeft);
document.Save(filename);
Thanks