Read File Or Resource
Use data.pdf.read(String) to read and parse PDF from a path. Passed path is either relative based on working dir or absolute path. Or it can be a resource class path. Pdf pdf = data.pdf.read("sample.pdf") pdf.pageText(0).should contain('Test text paragraph Test') Check data/import-and-dependencies Import And Dependencies for prerequisites.