Page 1 of 1

pdf portrait-format via right-click convert to lanscape-format in same folder by adding a filename extension _landscape

Posted: 2015-05-24T02:30:24-07:00
by helix
hello,
please excuse my bad english.
I would like a shipping label (.pdf) in the portrait remodel in landscape mode. I have a small .bat file (Windows) built me and checked first if I cut out image areas and can re-assemble - it works.
Here my example skript for my test with test.bat:

convert -density 400 -trim ups-label.pdf -quality 100 ups-label.jpg
convert ups-label.jpg -crop 507x894+90+332 image1.jpg
convert ups-label.jpg -crop 833x354+700+332 image2.jpg
.....
.....
composite -geometry +120+275 image1.jpg background.jpg ups-landscape.jpg
composite -geometry +335+559 image2.jpg ups-landscape.jpg ups-landscape.jpg
.....
......

Now I would like to have it so that I on a PDF file (example: UPS-label-386754.pdf) go by right-clicking (I build on regedit) and it is then converted directly to me to be stored in the same folder as the original file with a filename extension (UPS-label-386754_landscape.pdf).
Does anyone have an idea and can help me here next?
many Thanks

Re: pdf portrait-format via right-click convert to lanscape-format in same folder by adding a filename extension _landsc

Posted: 2015-06-06T15:25:26-07:00
by whugemann
As I understand, you are working under Windows, so your question is more about Windows than about ImageMagick.

The easiest way to establish this functionality would be to place the batch file in the SendTo folder, see http://www.imagemagick.org/Usage/windows/#scripts. You then have to refer to the full filename, including the path, something like

Code: Select all

  convert -density 400 %1 -rotate 90 -quality 100%% %~dpn1_landscape.jpg