1

I am trying to use wkhtmltoimage with Abram Adams image.cfc. I keep getting the error "Could not find the ColdFusion component or interface base". My code is below:

<cfscript>
wkhtmltoimage = new    customdesigner.com.wkhtmltoimage(binaryPath = 'C:\Program  Files\wkhtmltopdf\bin\wkhtmltoimage.exe');
image = wkhtmltoimage.create({
                'html': '#trim(form.data)#',
                'quality':'100',
                'encoding': 'utf-8'

    //writeToFile = true, // true will write the file and return a struct   containing the path (and other info)
    //destination = "#expandPath('..\media\client\images\L#session.locationcode#-#form.filename#-#session.uuid#.jpg')#"
});

</cfscript>

I know the executable path is correct because I use the same path for the htmltopdf and it works fine. What am I missing? Am I calling the component wrong?

SGekko
  • 335
  • 1
  • 19
  • 1
    Should it be `com.customdesigner.wkhtmltoimage()`? – Shawn Jun 20 '18 at 16:42
  • No. customdesigner is the root folder of the website. the folder com is inside the root and is where thewkhtmltoimage cfc resides. – SGekko Jun 20 '18 at 17:57
  • Before you try to use it in `image`, try dumping `wkthtmltoimage` and see what it's returning to you. Does your user have proper permissions to access `customdesigner\com\`? Can you reach it from where you are using your `cfscript`? – Shawn Jun 20 '18 at 18:20

0 Answers0