An image forming apparatus comprising: a printer section to form an image on a paper sheet; a plurality of paper feed trays to feed the paper sheet; and a controller configured to control the image forming apparatus to execute a job, and the controller having a function of executing an automatic tray switching where in cases where a paper feed tray runs out of a paper sheet while performing the paper feeding for executing the job, the controller continues the paper feeding by automatically switching to another paper feed tray containing a paper sheet that matches paper conditions for the job, wherein, after a first paper feed tray performing paper feeding runs out of the paper sheet in the course of executing a first job and the first paper feed tray is switched to a second paper feed tray by the automatic tray switching function, the controller continues to feed the paper sheet by using the second paper feed tray without using the first paper feed tray even after the first paper feed tray is refilled with the paper sheet, characterized in that the controller is configured to such that in a first step prior to executing the first job, said paper conditions are set up for every page (i) of the first job with i = 1...N number of pages such that the paper conditions including a paper size (Size (xi)), a paper type (Type (yi)), and a paper feed tray (Tray (zi)) to be used are separately set for each page of the first job with a specific paper size, a specific paper type, and a specific paper feed tray to be used, which are specified from a plurality of choices; and, at least during a period when the first job is executed, after the first paper feed tray is switched to the second paper feed tray by the automatic tray switching function, the controller continues to use the second paper feed tray as the paper feed tray for the remaining pages of the first job for which the first paper feed tray has been specified as the paper feed tray. a printer section to form an image on a paper sheet; a plurality of paper feed trays to feed the paper sheet; and a controller configured to control the image forming apparatus to execute a job, and the controller having a function of executing an automatic tray switching where in cases where a paper feed tray runs out of a paper sheet while performing the paper feeding for executing the job, the controller continues the paper feeding by automatically switching to another paper feed tray containing a paper sheet that matches paper conditions for the job, wherein, after a first paper feed tray performing paper feeding runs out of the paper sheet in the course of executing a first job and the first paper feed tray is switched to a second paper feed tray by the automatic tray switching function, the controller continues to feed the paper sheet by using the second paper feed tray without using the first paper feed tray even after the first paper feed tray is refilled with the paper sheet, characterized in that the controller is configured to such that in a first step prior to executing the first job, said paper conditions are set up for every page (i) of the first job with i = 1...N number of pages such that the paper conditions including a paper size (Size (xi)), a paper type (Type (yi)), and a paper feed tray (Tray (zi)) to be used are separately set for each page of the first job with a specific paper size, a specific paper type, and a specific paper feed tray to be used, which are specified from a plurality of choices; and, at least during a period when the first job is executed, after the first paper feed tray is switched to the second paper feed tray by the automatic tray switching function, the controller continues to use the second paper feed tray as the paper feed tray for the remaining pages of the first job for which the first paper feed tray has been specified as the paper feed tray.