image - ghostScript Crop pdf to thumbnail in rails -


i want covert pdf thumbnail of 185x185 size. using cropbox option of ghostscript crop pdf. creating thumbnail left bottom side of of pdf.

gs -q -sdevice=png16m -dnopause -dbatch -dfixedmedia -dpdffitpage=true -g185x185 -dusecropbox= true -soutputfile= + thumbfullpath+ "' '" + sourcefilecompletepath 

how should make sure pdf thumbnail cropped upper left corner??

also times, thumbnails turning sides away.

thanks in advance..

the postscript , pdf co-ordinate systems have 0,0 @ bottom left corner why begin drawing there. in order have top left corner of pdf content @ top left of resulting image, have translate co-ordinate system down 'appropriate' amount.

appropriate in case depends on knowing size of page , calculating amount of page rendered thumbnail, using 'translate' operator move origin top left of rendered image co-incident top left of page.

however, suspect isn't trying achieve. previous question, example file useful.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -