c# - PDF to PNG with high resolution -
i want convert pdf file png, want output 595*842 high resolution,
i used command:
gswin64.exe -q -sdevice=png16m -dsafer -dmaxbitmap=1000000000 -dtextalphabits=4 -dgraphicsalphabits=4 -dpdffitpage=true -sdevice=pngalpha -dbatch -dnopause -soutputfile=c:\cover.png c:\cover.pdf
i know can utilize -r300
alter dimension 2479*3509 also, i've tried -spapersize=a4 + -r300
didn't work.
how can have output in 595x842 high resolution?
current code:
processinfo = new system.diagnostics.processstartinfo( "gswin64.exe", "-q -sdevice=pngalpha -dbatch -dnopause -soutputfile=c:\\users\\mniyatkhair\\desktop\\cairocopy\\cover.png c:\\users\\mniyatkhair\\desktop\\cairocopy\\holding.pdf" ); // -r300 processinfo.createnowindow = true; processinfo.useshellexecute = true; processinfo.windowstyle = system.diagnostics.processwindowstyle.hidden; process = process.start(processinfo); process.waitforexit();
you can seek increment image resolution (for illustration -r(72*3)) , add together proportional downscale factor -ddownscalefactor=3. work native pdf matrixtransform.
c# ghostscript
No comments:
Post a Comment