Without a sample of the document that causes the error, it is difficult to guess what the problem is that is causing it.