Rotate pdf page 45 degrees, weird rotation and white space in results
Posted: 2017-09-13T13:38:24-07:00
I'm trying to rotate a pdf page by (some degrees) 45 degrees for example, and saving it back to pdf, and the result is creating weird white spacing and moving it off page inside the pdf result, if I save the output as png it works as expected.
Version: ImageMagick 6.9.9-10 Q16 x64 2017-08-27
Code with pdf to pdf used:
Same results when using png to pdf.
Example with image (same as the pdf):
Original:
To png rotated:
To pdf rotated:
To png from rotated pdf:
Version: ImageMagick 6.9.9-10 Q16 x64 2017-08-27
Code with pdf to pdf used:
Code: Select all
convert -density 288 -quality 100 sample.pdf[0] -rotate 45 -alpha remove sample-rot45.pdf
Example with image (same as the pdf):
Original:
To png rotated:
Code: Select all
convert.exe cat128.png -rotate 45 cat128rot45.png
To pdf rotated:
Code: Select all
convert.exe cat128.png -rotate 45 cat128rot45.pdf
To png from rotated pdf:
Code: Select all
convert.exe cat128rot45.pdf cat128rot45frompdf.png