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…...PdfSaveOptions; import com.aspose.html... // Initialize PdfSaveOptions PdfSaveOptions options = new PdfSaveOptions();...