First i had the same problem with the boarders: gswin64c -sDEVICE=jpeg -o F:\Sony\ftp\TestOutpu
t\test-%d.jpeg F:\Sony\ftp\PDFs\incorrect\000000874643_SB_01_01-mont-gs902.pdf
I look up for the problem and found the Solution: just adding -dUseCropBox solved my Problem.
Would it be possible to add this in the library??…
Thanks for your quick answers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
okay, I just changed the parameters. Here is the code:
//prepare args
String gsArgs = {
"-dQUIET",
"-dNOPAUSE",
"-dBATCH",
"-dSAFER",
"-dFirstPage=" + (begin + 1),
"-dLastPage=" + (end + 1),
"-dUseCropBox",
"-sDEVICE=display",
"-sDisplayHandle=0",
"-dDisplayFormat=16#804",
"-r" + this.getResolution(),
"-f",
diskStore.getFile(inputDiskStoreKey).getAbsolutePath()};
Here the explanation -dUseCropBox
Sets the page size to the CropBox rather than the MediaBox. Some files have a CropBox that is smaller than the MediaBox and may include white space, registration or cutting marks outside the CropBox. Using this option will set the page size appropriately for a viewer.
Thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
On some Pdfs i get white boarders after conversion to imagges with:
List<Image> images = renderer.render(document, i, i);
I think the pdfs has "cropping" infos which are should be shown or so…
But i couldn't find an option to only render the shown part of the picture.
Can anybody help me?
Hi,
What is the problem exactly: do you need to resize the output page ?
Gilles
No, i get white boarders on the images despite there are non in the original PDF.
What is the original paper size ?
Is it working better if you use the Ghostscript commande line directly ?
Now i tried it with command line:
First i had the same problem with the boarders: gswin64c -sDEVICE=jpeg -o F:\Sony\ftp\TestOutpu
t\test-%d.jpeg F:\Sony\ftp\PDFs\incorrect\000000874643_SB_01_01-mont-gs902.pdf
I look up for the problem and found the Solution: just adding -dUseCropBox solved my Problem.
Would it be possible to add this in the library??…
Thanks for your quick answers.
I need to add the parameter to the SimpleRenderer… I will do this as soon as I can.
You can also add it yourself in SimpleRenderer Java…
okay, I just changed the parameters. Here is the code:
//prepare args
String gsArgs = {
"-dQUIET",
"-dNOPAUSE",
"-dBATCH",
"-dSAFER",
"-dFirstPage=" + (begin + 1),
"-dLastPage=" + (end + 1),
"-dUseCropBox",
"-sDEVICE=display",
"-sDisplayHandle=0",
"-dDisplayFormat=16#804",
"-r" + this.getResolution(),
"-f",
diskStore.getFile(inputDiskStoreKey).getAbsolutePath()};
Here the explanation -dUseCropBox
Sets the page size to the CropBox rather than the MediaBox. Some files have a CropBox that is smaller than the MediaBox and may include white space, registration or cutting marks outside the CropBox. Using this option will set the page size appropriately for a viewer.
Thank you!