Hello,
I have an SDK Script activity in workflow designed to catch and redirect corrupt images before documents are sent to the DCC for OCR.
My script checks for a missing page image or a height/width of 0.
foreach(PageInfo page in doc.GetPageInfos()){ // Validate the contents of each page image if(!page.HasImage || page.ImageHeight <= 0 || page.ImageWidth <= 0){ corruptImages = true; } }
We recently upgraded to LF 11 and upgraded Import Agent to the latest version and I found that every imported document I check is failing.
Upon closer inspection, it seems that the documents coming in from Import Agent have a ImageHeight and ImageWidth property of 0 for the first page despite having a valid image file.
Whenever I open an affected document in the client the issue is resolved and the document no longer has 0 values for height/width.
Additionally, I found that just using page.ReadPagePart(PagePart.Image) is enough to correct the missing values.
As a result, I think this may be a bug with Import Agent because documents from other sources don't appear to be affected.
Import Agent version 10.4.0193
UPDATE: After extensive testing I discovered that this seems to happen with every file that is brought in via XML in Import Agent.
The same PDF generates pages without issues if brought in directly through IA or the client, but with XML imports in IA I could reproduce the issue every time.