在 Coldfusion cfscript 中从 pdf 创建缩略图
我试图在 Coldfusion 中从 pdf 创建缩略图,但没有创建缩略图,也没有抛出异常。 (冷熔9) 我的代码:
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);
}
运行此代码后,我没有收到错误或异常,但在 A:\testfolder\ 中没有生成图像,
我可能在这里遗漏了一些明显的东西,但找不到它。
此外,应用程序或异常日志中不会创建任何日志记录,pdf 不受保护,并且我确信该文件夹是可写的。 感谢所有帮助。
谢谢。
I'm trying to create a thumbnail from a pdf in coldfusion, but no thumbnail gets created and no exception is thrown.
(coldfusion 9)
my code:
var source = "A:\testfolder\test.pdf";
var destination = "A:\testfolder\";
createImageFromPdf(source, destination);
createImageFromPdf function:
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 don't receive errors or exceptions, but no image was generated in A:\testfolder\
I'm probably missing something obvious here, but can't find it.
Also no log records are created in application or exception log, pdf is not protected and I'm sure that the folder is writable.
All help is appreciated.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只是忘记传递
目的地
You just forgot to pass along the
destination