See this comment. If a pdf file does not have .pdf in the filename, we return the message Given file is not a PDF. Continuing without splitting.. The issue is that loadPdf here should not return as soon as the file extension check fails. Let's try to load the file in pdf-lib, and only return if that fails.
See this comment. If a pdf file does not have
.pdfin the filename, we return the messageGiven file is not a PDF. Continuing without splitting.. The issue is that loadPdf here should not return as soon as the file extension check fails. Let's try to load the file in pdf-lib, and only return if that fails.