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>
</dependency>
i used this input file
Epiq Homepage.zip (21.4 KB)
i received below exception
Error creating file: Cookie domain not set.
Parameter name: cookie.Domain
java.lang.RuntimeException: Cookie domain not set.
Parameter name: cookie.Domain
at com.aspose.html.utils.XQ.dispose(Unknown Source)
at com.aspose.html.utils.XR.dispose(Unknown Source)
at com.aspose.html.dom.Document.a(Unknown Source)
at com.aspose.html.dom.Document.navigate(Unknown Source)
at com.aspose.html.utils.P.a(Unknown Source)
at com.aspose.html.HTMLIFrameElement.cx(Unknown Source)
at com.aspose.html.HTMLIFrameElement$a.a(Unknown Source)
at com.aspose.html.utils.apl.a(Unknown Source)
at com.aspose.html.utils.apl.a(Unknown Source)
at com.aspose.html.utils.amw.a(Unknown Source)
at com.aspose.html.utils.amw.a(Unknown Source)
at com.aspose.html.utils.amw.a(Unknown Source)
at com.aspose.html.utils.amw.a(Unknown Source)
at com.aspose.html.utils.amw.a(Unknown Source)
at com.aspose.html.utils.amw.a(Unknown Source)
at com.aspose.html.utils.amw.a(Unknown Source)
at com.aspose.html.utils.amw.a(Unknown Source)
at com.aspose.html.utils.amw.a(Unknown Source)
at com.aspose.html.utils.amw.a(Unknown Source)
at com.aspose.html.utils.amw.a(Unknown Source)
at com.aspose.html.utils.Tq.a(Unknown Source)
at com.aspose.html.utils.Tq.a(Unknown Source)
at com.aspose.html.utils.To.g(Unknown Source)
at com.aspose.html.utils.Um.agt(Unknown Source)
at com.aspose.html.utils.Um.ahc(Unknown Source)
at com.aspose.html.utils.abb.a(Unknown Source)
at com.aspose.html.rendering.HtmlRenderer.render(Unknown Source)
at com.aspose.html.rendering.HtmlRenderer.render(Unknown Source)
at com.aspose.html.rendering.HtmlRenderer.render(Unknown Source)
at com.aspose.html.rendering.Renderer.render(Unknown Source)
at com.aspose.html.rendering.Renderer.render(Unknown Source)
at com.aspose.html.utils.jO.a(Unknown Source)
at com.aspose.html.utils.jO.a(Unknown Source)
at com.aspose.html.utils.jO.a(Unknown Source)
at com.aspose.html.converters.Converter.convertHTML(Unknown Source)
at org.epiqpoc.mainhtmlwithImaging.HtmlImagingConverter.convert(HtmlImagingConverter.java:26)
at org.epiqpoc.common.Common.lambda$doNextStep$0(Common.java:86)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: class com.aspose.html.utils.ms.System.ArgumentException: Cookie domain not set.
Parameter name: cookie.Domain
com.aspose.html.utils.net.CookieContainer.a(Unknown Source)
com.aspose.html.utils.net.CookieContainer.add(Unknown Source)
com.aspose.html.utils.net.CookieContainer.add(Unknown Source)
com.aspose.html.dom.Document$d$1.invoke(Unknown Source)
com.aspose.html.utils.XK.ang(Unknown Source)
com.aspose.html.utils.XL.amQ(Unknown Source)
com.aspose.html.utils.XL.b(Unknown Source)
com.aspose.html.utils.XL$1.invoke(Unknown Source)
com.aspose.html.utils.XC$a$1.invoke(Unknown Source)
com.aspose.html.utils.ms.System.Threading.Thread$3.invoke(Unknown Source)
com.aspose.html.utils.ms.System.Threading.Thread$6.run(Unknown Source)
java.base/java.lang.Thread.run(Thread.java:1583)
at com.aspose.html.utils.net.CookieContainer.a(Unknown Source)
at com.aspose.html.utils.net.CookieContainer.add(Unknown Source)
at com.aspose.html.utils.net.CookieContainer.add(Unknown Source)
at com.aspose.html.dom.Document$d$1.invoke(Unknown Source)
at com.aspose.html.utils.XK.ang(Unknown Source)
at com.aspose.html.utils.XL.amQ(Unknown Source)
at com.aspose.html.utils.XL.b(Unknown Source)
at com.aspose.html.utils.XL$1.invoke(Unknown Source)
at com.aspose.html.utils.XC$a$1.invoke(Unknown Source)
at com.aspose.html.utils.ms.System.Threading.Thread$3.invoke(Unknown Source)
at com.aspose.html.utils.ms.System.Threading.Thread$6.run(Unknown Source)
... 1 more
please help to fix this issue