프로그래밍 작업이 있습니다. 어디에서 무료 라이브러리 또는 명령 줄 프로그램을 사용하여 이미지를 PDF로 변환 C#을 사용해야합니다.C# 및 Ghostscript를 사용하여 pdf를 이미지로 변환
지금까지 고스트는 이미지의 중심에 8 빨간색 상자를 생성하는 것을 제외하고 작품을 사용하여 변환 :
PDF 파일의 내용은 순수한 흰색입니다,하지만 난이 왜 8 이미지에 빨간색 상자가 있습니까? 내가 뭘 잘못 했니? 여기
코드 : 당신을 감사합니다, 여기
string outputImagesPath = null;
string inputPDFFile = null;
inputPDFFile = @"C:\Users\user\cover.pdf";
outputImagesPath = @"C:\user\Desktop\1.jpg";
string ghostScriptPath = @"C:\Users\gswin32.exe";
String ars = "-o" + outputImagesPath+ "%03d.png -sDEVICE=jpeg -dJPEGQ=100 " + inputPDFFile;
Process proc = new Process();
proc.StartInfo.FileName = ghostScriptPath;
proc.StartInfo.Arguments = ars;
proc.StartInfo.CreateNoWindow = true;
//proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.Start();
string strOutput = proc.StandardOutput.ReadToEnd();
Console.WriteLine(strOutput);
proc.WaitForExit();
는 PDF 파일의 링크입니다 https://drive.google.com/open?id=0B0auNx4EZsCUUkFHWGR4MjV5NzA
당신의 오류는 여기 '+ outputImagesPath + "% 03d.png'라고 생각합니다.'+ outputImagesPath +"% d.jpeg'일까요? – lokusking