Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C#在Edge或Chrome中的deafult PDF浏览器导致错误的系统上打印PDF文件_C#_.net_Wpf - Fatal编程技术网

C#在Edge或Chrome中的deafult PDF浏览器导致错误的系统上打印PDF文件

C#在Edge或Chrome中的deafult PDF浏览器导致错误的系统上打印PDF文件,c#,.net,wpf,C#,.net,Wpf,我在默认的pdf阅读器为Adobe时尝试了该代码,但在默认的pdf阅读器为Edge时,它返回以下错误“没有应用程序与此操作的指定文件关联” 找到Acrobat的路径并启动Acrobat?购买一个无需外部程序即可打印PDF的PDF库?@ThomasWeller你能推荐一个库吗?我没有使用此类库的经验,但有很多:(~700美元)(~800美元)(~300美元)(~1000美元以上)。如果你需要免费的东西,谷歌的Ghostscript,比如 Process p = new Process(); p.

我在默认的pdf阅读器为Adobe时尝试了该代码,但在默认的pdf阅读器为Edge时,它返回以下错误“没有应用程序与此操作的指定文件关联”


找到Acrobat的路径并启动Acrobat?购买一个无需外部程序即可打印PDF的PDF库?@ThomasWeller你能推荐一个库吗?我没有使用此类库的经验,但有很多:(~700美元)(~800美元)(~300美元)(~1000美元以上)。如果你需要免费的东西,谷歌的Ghostscript,比如
Process p = new Process();

p.StartInfo = new ProcessStartInfo()
{
    CreateNoWindow = true,
    Verb = "print",
    FileName = path //put the correct path here
};
p.Start();