Function Evaluation Timeout Exception on pdfDocument Page ColorType

We got a issue while processing PDF though Aspose components.

Version used: 20.5.0.0

I need to extract table data from pdf, while implementation I used TableAbsorber, but TableList.Count is shown 0,

While debugging I have identified that

pdfDocument.Pages[i].ColorType
Shows exception "function evaluation timeout"

Please advise how to get rid of this exception, as it’s very critical at this moment. I already spend more time on this for search and all.

@adhikchavan2008

Would you kindly share your sample PDF document with us. We will test the scenario in our environment and address it accordingly.

test1.pdf (3.9 MB)

Hi Asad,
Thanks for reply. file is attached which is having exceptions.

I need to be extract three pages table only.
Also it works for attached file .test2.pdf (109.3 KB). I dont know why it is not working for “test1.pdf”

@adhikchavan2008

We have tested the scenario in our envrionment with your both PDF files and Aspose.PDF for .NET 20.5. We were unable to notice any issue while using your code snippet. Would you please make sure that you are using latest version of the API. In case you still face any issue, please share complete sample code snippet so that we can try to reproduce the issue in our environment and address it accordingly.

AsposePDFVersion.jpg (38.0 KB)
This is the ASPOSE version info.
And sample code snippet.

        List<Filing> filingList = new List<Filing>();
        MainModel model = new MainModel();
        string _FileName = "";
        try
        {
            if (Request.Files.Count > 0)
            {
                HttpFileCollectionBase files = Request.Files;
                HttpPostedFileBase file = files[0];
                if (file.ContentLength > 0)
                {
                    _FileName = Path.GetFileName(file.FileName);
                    string _path = Path.Combine(Server.MapPath("~/UploadFiles"), _FileName);
                    string _extention = Path.GetExtension(file.FileName);
                    file.SaveAs(_path);
                    model.FilePath = _path;
                    Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(_path);
                    int pdfpageCount = pdfDocument.Pages.Count;           
                    for (int i = 1; i <= pdfpageCount; i++)
                    {
                        
                            TableAbsorber absorber = new TableAbsorber();
                            absorber.Visit(pdfDocument.Pages[i]);
                            AbsorbedTable[] tables = new AbsorbedTable[absorber.TableList.Count];
                            absorber.TableList.CopyTo(tables, 0);
                            foreach (AbsorbedTable table in tables)
                            {
                                for (int idRow = 0; idRow < table.RowList.Count; idRow++)
                                {
                                    Aspose.Pdf.Text.AbsorbedRow row = table.RowList[idRow];
                                    Filing fileRow = new Filing();

                                    if (row.CellList.Count > 5)
                                    {
                                        // table cell data to filingList
                                    }
                                }
                            }
                        }
                    }
              }
        }
        catch (Exception e)
        {
        }
        finally
        {
        }

@adhikchavan2008

Thanks for providing details.

We have managed to replicate the issue in our environment and logged it as PDFNET-48210 in our issue tracking system. We will check this issue in detail and keep you posted with the status of its resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.

Found any Solution?

@adhikchavan2008

We regret to share that ticket is not yet resolved. Please note that it was logged under free support model and will be investigated/resolved on first come first serve basis. We will surely inform you as soon as we have some definite updates regarding issue resolution. Please spare us some time.

We are sorry for the inconvenience.