I am trying to remove left and right right white spaces of PDF and here is what I have written:
gswin64c.exe -sDEVICE=pdfwrite -sOutputFile=c:\test\test\out\IEq3_8.5011.pdf -dPDFSETTINGS=/prepress -c "<</PageOffset [0 0]>> setpagedevice" -f C:\test\test\out\IEq3_8.5011.pdf
I have successfully done this using bbox but only thing is that bbox strips the white margins from all sides wherein I would like to retain the top and bottom white spaces in result output. Here is something I have written for bbox:
gswin64c.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=c:\test\test\out\%~nx1 -c "[/CropBox [%MyVar%] /PAGES pdfmark" -f %~1
I am new to ghostscript but trying hard to fix some issues in our tools wherein our input is PDF.
Any pointers will be appreciated. Thanks, P