Unable to convert pdf to html using pdfbox

In RPA express Version 2.1-beta, facing below exception while using import org.apache.pdfbox.util.PDFText2HTML as part of code to convert pdf to html which was working as expected in Version 2.0-beta.

Exception
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script2.groovy: 17: unable to resolve class org.apache.pdfbox.util.PDFText2HTML
@ line 17, column 3.
import org.apache.pdfbox.util.PDFText2HTML;
^

1 error

Hi @swetha.singamala1 please share the code of your bot task here.

Please find the attachments containing bot config xml and exception stack trace

pdf2html.xml (1.5 KB)
ExceptionStackTrace.txt (3.6 KB)

@swetha.singamala1 try using org.apache.pdfbox.tools.PDFText2HTML instead of org.apache.pdfbox.util.PDFText2HTML.

Resulting below exception when import org.apache.pdfbox.tools.PDFText2HTML is used
groovy.lang.GroovyRuntimeException: Could not find matching constructor for: org.apache.pdfbox.tools.PDFText2HTML(String)
org.webharvest.exception.ScriptException:
Config line 36: script block
groovy.lang.GroovyRuntimeException: Could not find matching constructor for: org.apache.pdfbox.tools.PDFText2HTML(String)
at org.webharvest.runtime.scripting.GroovyScriptEngine.eval(GroovyScriptEngine.java:138)
at org.webharvest.runtime.processors.ScriptProcessor.execute(ScriptProcessor.java:78)
at org.webharvest.runtime.processors.BaseProcessor.run(BaseProcessor.java:127)
at org.webharvest.runtime.processors.BodyProcessor.execute(BodyProcessor.java:27)
at org.webharvest.runtime.processors.VarDefProcessor.execute(VarDefProcessor.java:59)
at com.freedomoss.crowdcontrol.webharvest.processors.VarDefProcessorValidated.execute(VarDefProcessorValidated.java:28)
at org.webharvest.runtime.processors.BaseProcessor.run(BaseProcessor.java:127)
at org.webharvest.runtime.Scraper.execute(Scraper.java:169)
at org.webharvest.runtime.Scraper.execute(Scraper.java:182)
at com.freedomoss.crowdcontrol.webharvest.executor.LocalWebharvestTaskExecutor.executeWebHarvestTask(LocalWebharvestTaskExecutor.java:173)
at com.workfusion.studio.launch.SingleThreadWebHarvestProcess.processTaskInputs(SingleThreadWebHarvestProcess.java:77)
at com.workfusion.studio.launch.SingleThreadWebHarvestProcess.start(SingleThreadWebHarvestProcess.java:46)
at com.workfusion.studio.launch.WebHarvestMainLauncher.launch(WebHarvestMainLauncher.java:108)
at com.workfusion.studio.launch.WebHarvestMainLauncher.main(WebHarvestMainLauncher.java:180)
Caused by: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: org.apache.pdfbox.tools.PDFText2HTML(String)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1752)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1559)
at org.codehaus.groovy.runtime.callsite.MetaClassConstructorSite.callConstructor(MetaClassConstructorSite.java:48)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:238)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:250)
at PdfConverter.pdfToHtml(Script2.groovy:23)
at PdfConverter$pdfToHtml.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at Script5.run(Script5.groovy:36)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:444)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:482)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:453)
at org.webharvest.runtime.scripting.GroovyScriptEngine.eval(GroovyScriptEngine.java:136)
… 13 more
02:23:23 [INFO] -------------------------------------------
02:23:23 [INFO] EXECUTION FAILED
02:23:23 [INFO] Could not find matching constructor for: org.apache.pdfbox.tools.PDFText2HTML(String)
02:23:23 [INFO] (readPDF.xml:36)
02:23:23 [INFO] -------------------------------------------