Wednesday, October 15, 2008

Google

WebSupergoo.ABCpdf6.Doc theDoc = new WebSupergoo.ABCpdf6.Doc();

theDoc.Rect.Inset(50, 90);
theDoc.Page = theDoc.AddPage();
int theID;
theID = theDoc.AddImageUrl(System.Web.HttpContext.Current.Request.Url.ToString());
while (true)
{
theDoc.FrameRect(); // add a black border
if (!theDoc.Chainable(theID))
break;
theDoc.Page = theDoc.AddPage();
theID = theDoc.AddImageToChain(theID);
}
for (int i = 1; i <= theDoc.PageCount; i++)
{
theDoc.PageNumber = i;
theDoc.Flatten();
}
if (Request.QueryString["DocumentNo"] != null)
{
string dateNow = "(" + DateTime.Now.ToString().Replace("/", "-") + ")";
dateNow = dateNow.Replace(" ", "-");
dateNow = dateNow.Replace(":", "-");
theDoc.Save(Server.MapPath("PDFInvoices/" + Request.QueryString["DocumentNo"].ToString() + dateNow + ".pdf"));
}

theDoc.Clear();