ghostscript - GhostScriptSharp resolution problems -


i trying create thumbnail pdf file, need 300px*300px no matter can not image correct size. seems huge.

this code:

        ghostscriptsettings settings = new ghostscriptsettings();         settings.page.allpages = false;         settings.page.start = 1;         settings.page.end = 1;         settings.size.native = ghostscriptsharp.settings.ghostscriptpagesizes.a2;         settings.device = ghostscriptsharp.settings.ghostscriptdevices.png16m;         settings.resolution = new size(72, 72);          ghostscriptwrapper.generateoutput(path.combine(filepath, filename), finalpath, settings); // create initial thumbnail 

is there way output image ppi of 300*300 ?

cheers,

/r3plica

looks me setting resolution of 300x300. 300 dots per inch, give reasonably large files.

you want change page size, looks me setting a2. a2 page @ 300 dpi indeed produce large output files.....

i have no idea how change media size in c#. ghostscript command line switches need -ddevicewidth=300 -ddeviceheight=300 -dfixedmedia

you using 'psd' file, suggest photoshop native file format me, ghostscript won't interpret. possibly mean pdf file, in case should add -dpdffitpage. if on other hand mean ps (postscript) file, should set pagesize policy 3 (select nearest media , scale down).


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -