To generate print jobs to be executed by a printing device, an image processing apparatus edits drawing commands output by applications and stored in storage means, in accordance with editing instructions input through input means, executes a process of generating chasing data using the drawing commands, the process including the edition, and then executes a process of generating print data, the process including the edition. The editing instructions for the drawing commands include an instruction to combine a plurality of drawing commands, an instruction to separate a drawing command into a plurality of subcommands, and an instruction to delete a drawing command. The chasing data is generated so as to have a layered data structure indicating the combinative relationship among the plurality of drawing commands if the editing instruction instructs a plurality of drawing commands to be combined together.