Take the 2-minute tour ×

I'm trying to render a web page that contains images into a pdf document using ABCpdf. This is done from a web application.

When I run the application on my development machine in IIS5, everything is fine. When I deploy the application on IIS6, the images don't appear in the pdf.

To reproduce the problem, I made a simple web application to render a pdf file from a simple web page and I found out that the images which are not local are the ones that don't appear in the pdf.

The relevant code that interacts with ABCpdf is:

Doc theDoc = new Doc();
theDoc.Rect.Inset(18, 18);
theDoc.HtmlOptions.PageCacheEnabled = false;
theDoc.HtmlOptions.UseNoCache = true;
theDoc.HtmlOptions.Timeout = 60000;

int theID = theDoc.AddImageUrl(theUrl);

while (true)
  if (!theDoc.Chainable(theID)) break;
  theDoc.Page = theDoc.AddPage();
  theID = theDoc.AddImageToChain(theID);

for (int i = 1; i <= theDoc.PageCount; i++)
  theDoc.PageNumber = i;


The html page that I'm using for test is this:

<head><title>Test page</title></head>

<p>This is a local image</p>
<img src="http://myserver/test/images/testimage.gif" />

<p>This is a remote image</p>
<img src="http://l.yimg.com/a/i/ww/beta/y3.gif" />


So I'm trying to render the page at this url: http://myserver/test/testpage.html (the code above) into a pdf.

In IIS6, the second image (that is not local for the server) doesn't appear in the pdf.

It seems to be a problem with access rights, but I couldn't figure it out.

Thank you.

share|improve this question
have you find any solution to your problem ? –  sptremblay Apr 20 '10 at 19:17
Nope. The project was dropped anyway ... –  Paul May 16 '11 at 15:23

2 Answers 2

I know this is a little late, but hopefully will help someone else!

Just been experiencing a very similar problem (which is how I landed at this page..). The version of IIS was the same, but it was being run on a different server. Looks like the problem was more generation of the PDF before the image has finished downloading.

I got in touch with WebSuperGoo. The said under the hood it uses MSHTML (good chance that's the difference in your environments) and a couple of suggestions were to try:

theDoc.SetInfo(0, "CheckBgImages", "1");


theDoc.SetInfo(0, "RenderDelay", "5000");  // You can change this value, just an initial test.

The second will delay rendering the PDF, giving the image a chance to download.

share|improve this answer

I had a similar issue and found it was caused by the size of the image file being too large.

share|improve this answer

Your Answer


