A bookbinding system sets one of a right-opening bookbinding mode for feeding a cover sheet on which a cover is laid out at the left of a spine portion thereof to generate a right-opening book, and a left-opening bookbinding mode for feeding a cover sheet on which a cover is laid out at the right of the spine portion to generate a left-opening book. Also, the bookbinding system executes rotating processing for changing the top-and-bottom directions of image data depending on whether the right-opening bookbinding mode or the left-opening bookbinding mode is set so as to print image data that should be the top page, of image data of multiple pages, on a sheet serving as the top page of body, thereby appropriately generating a right-opening book and a left-opening book.