In the next version, 3.2, it will be possible to use the words "landscape" and "portrait" as page selectors, in any of the tools that have the possibility to define the list of affected pages. I have it already implemented, as depicted in the attached screenshot.
Even so, you can do it already with a script.
Here's one that rotates all the portrait pages by 90 degrees:
var ProgressBar = pdfe.ProgressBar;
ProgressBar.max = pdfe.SelectedFiles.Count;
for (var i = 0; i < pdfe.SelectedFiles.Count; i++) {
ProgressBar.position = i + 1;
try {
var Pages = pdfe.SelectedFiles(i).Pages;
var RotatedPagesCount = 0;
for (var PageIndex = 0; PageIndex < Pages.Count; PageIndex++) {
var Page = Pages(PageIndex);
if (Page) {
//Note: this rotation angle check should be removed for versions>3.1.x
if (Page.Rotation == 90 || Page.Rotation == 270) {
var w = Page.Height;
var h = Page.Width;
} else {
var w = Page.Width;
var h = Page.Height;
}
if (h > w) {
Page.Rotation = Page.Rotation + 90;
RotatedPagesCount++;
}
}
}
if (RotatedPagesCount) {
if (Pages.CommitChanges(pdfe.SelectedFiles(i).Filename + '(rot).pdf')) {
pdfe.echo(pdfe.SelectedFiles(i).Filename + ' (rotated ' + RotatedPagesCount + ' pages)');
} else {
pdfe.echo(pdfe.SelectedFiles(i).Filename + ' (failed to commit changes)', 0xFF0000);
}
} else {
pdfe.echo(pdfe.SelectedFiles(i).Filename + ' (nothing to rotate)');
}
} catch (e) {
pdfe.echo(pdfe.SelectedFiles(i).Filename + ' :' + e.message, 0xFF0000);
}
}
pdfe.echo("Done");