Creating a sketch from pdf in coldfusion cfscript

I am trying to create a sketch from pdf in coldfusion, but no thumbnails are created and no exception is thrown. (coldfusion 9) my code is:

var source = "A:\testfolder\test.pdf"; var destination = "A:\testfolder\"; createImageFromPdf(source, destination); 

createImageFromPdf:

 public void function createImageFromPdf(required string source, required string destination, numeric pages = 1, string resolution = "low", numeric scale = 100, boolean overwrite = true){ var pdf = new pdf(); pdf.setSource(arguments.source); pdf.thumbnail(pages = arguments.pages, resolution = arguments.resolution, scale = arguments.scale, overwrite = arguments.overwrite); } 

After running this code, I get no errors or exceptions, but in A: \ testfolder \

I probably missed something obvious, but I can not find it.

Also, no journal entries are created in the application or exception log, the PDF is not protected, and I am sure that the folder is writable. All help is appreciated.

Thanks.

+4
source share
1 answer

You just forgot to go to destination

 pdf.thumbnail(destination=arguments.destination , pages = arguments.pages , resolution = arguments.resolution , scale = arguments.scale , overwrite = arguments.overwrite); 
+7
source

All Articles