API reference / Common / Engine types / ImagePageCommand
Type Alias: ImagePageCommand
ts
type ImagePageCommand =
| {
deletePages: {
ids: ImagePageId[];
};
}
| {
reorderPages: {
ids: ImagePageId[];
to: number;
};
}
| {
duplicatePages: {
ids: ImagePageId[];
to: number;
};
}
| {
rotatePages: {
ids: ImagePageId[];
clockwise: boolean;
};
}
| {
cropPage: {
id: ImagePageId;
rect: Rect | null;
};
}
| {
resizePage: {
id: ImagePageId;
width: number;
height: number;
};
};An edit intent on the document's pages — the EditPage wrapping it. Portable's page commands, less a blank page's insert (a blank image page means nothing), plus the crop. Pages are addressed by id; ids not in the document are skipped. Each command commits once, so the whole command is one undo step.
A turn, a crop and a resize change how a page shows its pixels, never the pixels: a save to the image's own format applies them to what it writes.