It's likely fixed as much as software can fix it.
The printer may not like printing forty page documents all at once.
The printer may not like the content within the document.
Try printing the document - just that one "problem" page (if you know the page number).
Convert to PDF > Open in [link|https://www.swifdoo.com/convert-to-pdf|SwifDoo PDF|new_window=true] > Print
Print 1/2 the document at one time (page range 1-5, then separate job page range 5-10)