![]() If you use "-r300" the width of the image will be 3000 pixel and height will change accordingly, from the above argument you will get 1024 to 768 size jpg image. You can specify the output image's aspect ratio in the argument with the -r flag. Your input files don't even need to be PDF files. String ars = "-dNOPAUSE -sDEVICE=jpeg -r102.4 -o" + outputImagesPath + "%d.jpg -sPAPERSIZE=a4 " +"\"" + inputPDFFile + "\"" It is easy to combine several input files into one combined PDF using Ghostscript: gs -sDEVICEpdfwrite \ -dNOPAUSE -dBATCH -dSAFER \ -sOutputFilecombined.pdf \ first.pdf \ second.pdf \ third.pdf. IF your input PDF file name has any spaces, you need to change the argument to String ars = "-dNOPAUSE -sDEVICE=jpeg -r102.4 -o" + outputImagesPath + "%d.jpg -sPAPERSIZE=a4 " + inputPDFFile String ghostScriptPath = Files (x86)\gs\gs8.64\bin\gswin32.exe" Private void PdfToJpg(string inputPDFFile, string outputImagesPath) You Do not need to add any DLL reference to your project.įirst download the gs910w32.exe application file
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |