在win server 2012R2 .NET上发布ImageMagick-6.9.8-Q16 [英] Issue ImageMagick-6.9.8-Q16 on win server 2012R2 .NET

查看:170
本文介绍了在win server 2012R2 .NET上发布ImageMagick-6.9.8-Q16的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从ImageMagick的官方网站下载ImageMagick-6.9.8-Q16后,当我尝试使用此命令将文件.tiff转换为.pdf时收到此错误:

After downloading ImageMagick-6.9.8-Q16 from the official site of ImageMagick, i receive this error when i try to convert a file .tiff to .pdf using this command:

convert -resample 200X200 dir.tif dir.pdf

错误

当我尝试使用.NET程序运行时,此命令无法创建文件.pdf

and when i try to run using .NET program, this command can't create a file.pdf

        ProcessStartInfo pinfo = new ProcessStartInfo();
        pinfo.UseShellExecute = false;
        pinfo.RedirectStandardOutput = true;
        pinfo.CreateNoWindow = true;
        pinfo.FileName = converterPath;
        pinfo.Arguments = "convert -resample 200X200" + dirTif+ dirPdf;


        Process proc = null;
        try
        {
            proc = Process.Start(pinfo);
            proc.WaitForExit(); 
        }
        catch (Exception ex)
        {

         serviceLogger.WriteMessage("PROCESS EXCEPTION", ex.Message + " | " + ex.StackTrace + " | " +ex.Source );
        }

如何解决?

推荐答案

你可以这样忽略它们:

convert image.tif -define tiff:ignore-tags=TAG1,TAG2,TAG3 ...

如果你想检查你首先忽略了什么,看看这里搜索TIFF标签。

If you want to check what you are ignoring first, look here to search for TIFF tags.

这篇关于在win server 2012R2 .NET上发布ImageMagick-6.9.8-Q16的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆