i've found an issue with pdf files with cropbox. a white border is rendered. example: the pdf with 200px width and 100px height has a cropbox of 5 pixel at all borders. so the mediabox is only 190px x 90px. "pdftoppm -cropbox" converts the pdf to a 200px x 100px ppm image. the cropbox is in the image. all is fine. "pdftoppm" (without -cropbox) converts also a 200px x 100px ppm image, but the 5px border is white around the 190px x 90px mediabbox. pdftoppm version 0.17.1 source compiled on gentoo linux. do you need example files or some more information?
Yes, attach sample files
Created attachment 49016 [details] PDF with cropbox
Created attachment 49017 [details] image1-1.png
Created attachment 49018 [details] image2-1.png
here are my commands: for image1: pdftoppm -q -f 1 -l 1 -r 72 -cropbox -png -scale-to-x 558 -scale-to-y 293 cropbox.pdf image1 for image2: pdftoppm -q -f 1 -l 1 -r 72 -png -scale-to-x 558 -scale-to-y 293 cropbox.pdf image2 image2-1.png now has a white border. expected result: the image2 was converted from von pdf (withput cropbox) and and scaled up to given x/y.
I don't see any problem, if you do not specify -cropbox the cropbox is not used and thus you get the white borders outside the cropbox. Seems like proper behaviour to me.
the white border is the right way to handle it? i think, if no -cropbox is set, the ppm have to be the whole width of 220,49mm in this example (without a white border over the red background). if it's the right way, in which usage i shouldn't use -cropbox? a image with a white border seams corrupt for me. and finally, i can't know that i have to use -cropbox with some pdfs.
> the white border is the right way to handle it? the white border is not "the right way to handle it", the white border is there in the pdf file and we render it because you ask us to do it. > i think, if no -cropbox is set, the ppm have to be the whole width of 220,49mm > in this example (without a white border over the red background). Why? If you do not set the cropbox, we render according to the mediabox, and the white rectangle is there, so we render it. > if it's the right way, in which usage i shouldn't use -cropbox? When you want to render the mediabox instead of the cropbox > a image with a white border seams corrupt for me. Again, we add no white border at all, we just render what is on the pdf. > and finally, i can't know that i have to use -cropbox with some pdfs. Please read about the cropbox, mediabox, et al concepts regarding PDF because it seems to me you really do not seem to know what you are talking about. Basically you most probably always want the cropbox option. I'm closing the bug because i see in no way we do anything wrong.
i'm knowing the concepts of the borders in pdf. Mhh, in the pdf there are no white borders. please have a look in arcobat. i have attached a screenshot of it. the green border is the cropbox (Beschnitt-Rahmen in german). you can verify where the white border comes from?
Created attachment 49270 [details] screenshot.png
I see a white border in that screenshot
you are right. sorry for my confusion.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.