i used below dependency in java to convert html file to pdf.
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-imaging</artifactId>
<version>25.5</version>
</depen…...Specify the path to your HTML file String htmlFilePath = "path/to/your/input...output PDF file path String outputPdfPath = "path/to/your/output...