gorgueugr / page-count

Node package for counting pages of files pdf, docx, odt, etc...
8 stars 1 forks source link

DocxCounter.count not working for complex docx layouts #4

Open SATYAM1000 opened 4 months ago

SATYAM1000 commented 4 months ago

I'm using the latest version of page-count library within a function to count pages in various document formats. The function, pageCounter, works successfully for files with extensions like pdf, pptx, and some docx files. However, I'm encountering the error "Unhandled Rejection at: [object Promise] reason: Cannot read properties of undefined (reading '0')" for certain docx files.

The error seems to occur with docx files that have complex layouts, including elements like multiple columns, embedded objects (images, charts), or specific fonts. Simpler docx files with minimal formatting are processed correctly by DocxCounter.count.

MuzammilIrshad commented 2 months ago

facing the same issue in many docx files