如何使用Windows打印图片从目录打印多个图像 [英] how to print multiple images from directory with windows print pictures
本文介绍了如何使用Windows打印图片从目录打印多个图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hi
i使用此代码打印带有Windows打印图片
Hi
i using this code for print with windows print pictures
string fileName = @"C:\Images\12.jpg";
var p = new Process();
p.StartInfo.FileName = fileName;
p.StartInfo.Verb = "Print";
p.Start();
i希望从目录打开多个图像到这个,我该怎么办?
With Respect
i want open multiple images from directory into this, how can i do it?
With Respect
推荐答案
这应该找到文件夹C:\Images中的所有.jpg文件。
This should find all ".jpg" files in the folder "C:\Images".
DirectoryInfo d = new DirectoryInfo(@"C:\Images");
FileInfo[] Files = d.GetFiles("*.jpg");
foreach(FileInfo file in Files )
{
var p = new Process();
p.StartInfo.FileName = file.fileName;
p.StartInfo.Verb = "Print";
p.Start();
}
这篇关于如何使用Windows打印图片从目录打印多个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文