There are many ways to generate PDF reports in Cucumber; in this article we will generate PDF reports using an Extent Adapter.
Step 1: Follow this article to Add POM.xml, create and configure extent property file and add the plugin to the Test Runner class.
Step 2: To attach screenshot to your extent report, refer this article
Step 3: Add following 2 lines in extent.properties
Execute your code, You will find PDF in folder mentioned in extent properties file.