An image forming apparatus includes a reading unit which reads a document
image, a detecting unit which detects a document direction representing
whether a sub-scanning direction in reading the document image is a short
side or a long side direction of an original document, a designating unit
which designates, as a copying function, a form for copying the document
image on a sheet, an editing unit which edits the read document image as
an image corresponding to the designated copying function, a copying unit
which copy the edited image on the sheet, and an acquiring unit which
acquires a sheet direction representing whether a conveying direction of
the sheet conveyed to the copying unit is the short side or the long side
direction of the sheet. The editing unit executes processing on the
document image on the basis of the document direction, the sheet
direction, and the designated copying function.