zoukankan      html  css  js  c++  java
  • C# pdf 转换成 image

    软件下载及注册机:https://files.cnblogs.com/kaixing/PDF2IMG.rar

    要正常运行程序必须下载

    代码如下

    public void Pdf2Img(string path, string pdfName)
            {

        //软件地址
                string cmdStr = AppDomain.CurrentDomain.BaseDirectory + "PDF2Image\\pdf2img.exe";
                string SourcePath = @"""" + path + @"""";
                string TargetPath = @"""" + AppDomain.CurrentDomain.BaseDirectory + "Images\\" + pdfName.Substring(0, pdfName.LastIndexOf(".")) + ".gif" + @"""";
        //命令          

        string argsStr = "  -r 25 -f 1 -l 1 -i " + SourcePath + " -o " + TargetPath;
                //调用新进程 进行转换
                Process p = new Process();
                ProcessStartInfo psi = new ProcessStartInfo(cmdStr, argsStr);
                p.StartInfo = psi;
                p.Start();
                p.WaitForExit();
                File.Delete(path);
            }

  • 相关阅读:
    phpcms相关
    php文件缓存
    js 、jq强化复习
    框架替换主页
    羽恒梦工厂所有后台的操作页面
    羽恒梦工厂个人中心
    羽恒梦工厂详情页
    待查的问题
    ASP.NET中的常用快捷键
    快速排序
  • 原文地址:https://www.cnblogs.com/kaixing/p/2257490.html
Copyright © 2011-2022 走看看