title: repeatedly call AddImageUrl(url) to assemble pdf document
body: <p>I'm using abcpdf and I'm curious if we can we recursively call AddImageUrl() function to assemble pdf document that compile multiple urls?</p>
  
  <p>something like:</p>
  
  <pre><code>     int pageCount = 0;
       int theId = theDoc.AddImageUrl("http://stackoverflow.com/search?q=abcpdf+footer+page+x+out+of+", true, 0, true);
       //assemble document
       while (theDoc.Chainable(theId))
       {
          theDoc.Page = theDoc.AddPage();
          theId = theDoc.AddImageToChain(theId);
       }
       pageCount = theDoc.PageCount;
       Console.WriteLine("1 document page count:" + pageCount);
       //Flatten document
       for (int i = 1; i &lt;= pageCount; i++)
       {
          theDoc.PageNumber = i;
          theDoc.Flatten();
       }
  
       //now try again
       theId = theDoc.AddImageUrl("http://stackoverflow.com/questions/1980890/pdf-report-generation", true, 0, true);
       //assemble document
       while (theDoc.Chainable(theId))
       {
          theDoc.Page = theDoc.AddPage();
          theId = theDoc.AddImageToChain(theId);
       }
       Console.WriteLine("2 document page count:" + theDoc.PageCount);
       //Flatten document
       for (int i = pageCount + 1; i &lt;= theDoc.PageCount; i++)
       {
          theDoc.PageNumber = i;
          theDoc.Flatten();
       }
       pageCount = theDoc.PageCount;
  </code></pre>
  
  <p>edit:
  code that seems to work based on 'hunter' solution:</p>
  
  <pre><code>      static void Main(string[] args)
    {
       Test2();
    }
  
    static void Test2()
    {
  
       Doc theDoc = new Doc();
       // Set minimum number of items a page of HTML should contain. 
       theDoc.HtmlOptions.ContentCount = 10;// Otherwise the page will be assumed to be invalid.
       theDoc.HtmlOptions.RetryCount = 10; // Try to obtain html page 10 times
       theDoc.HtmlOptions.Timeout = 180000;// The page must be obtained in less then 10 seconds
  
       theDoc.Rect.Inset(0, 10);  // set up document
       theDoc.Rect.Position(5, 15);
       theDoc.Rect.Width = 602;
       theDoc.Rect.Height = 767;
       theDoc.HtmlOptions.PageCacheEnabled = false;
  
       IList&lt;string&gt; urls = new List&lt;string&gt;();
       urls.Add("http://stackoverflow.com/search?q=abcpdf+footer+page+x+out+of+");
       urls.Add("http://stackoverflow.com/questions/1980890/pdf-report-generation");
       urls.Add("http://yahoo.com");
       urls.Add("http://stackoverflow.com/questions/4338364/recursively-call-addimageurlurl-to-assemble-pdf-document");
  
       foreach (string url in urls)
          AddImage(ref theDoc, url);
  
       //Flatten document
       for (int i = 1; i &lt;= theDoc.PageCount; i++)
       {
          theDoc.PageNumber = i;
          theDoc.Flatten();
       }
  
       theDoc.Save("batchReport.pdf");
       theDoc.Clear();
       Console.Read();
  
    }
  
  
    static void AddImage(ref Doc theDoc, string url)
    {
       int theId = theDoc.AddImageUrl(url, true, 0, true);
       while (theDoc.Chainable(theId))
       {
          theDoc.Page = theDoc.AddPage();
          theId = theDoc.AddImageToChain(theId); // is this right?
       }
       Console.WriteLine(string.Format("document page count: {0}", theDoc.PageCount.ToString()));
    }
  </code></pre>
  
  <p>edit 2:unfortunately calling AddImageUrl multiple times when generating pdf documents doesn't seem to work...</p>