Patent ID: 8345275

Claim:
An image forming apparatus comprising: an acquisition unit configured to acquire a file stored in a storage medium that is removably attached to the image forming apparatus; an expansion unit configured to expand the acquired file; an expansion control unit configured to control the expansion unit to skip expanding of unexpanded data that the expansion unit is unable to expand from the file and to continue the expanding of the file; a printer configured to execute printing in accordance with expanded data from the file; a replacement unit configured to replace at least the unexpanded data that the expansion unit is unable to expand with substitute data that is expandable by the expansion unit; and an operation unit configured to select an entire-page replacement mode and a partial replacement mode, wherein in the entire-page replacement mode, the replacement unit is configured to replace an entire page with the substitute data, and wherein in the partial replacement mode, the replacement unit is configured to replace the unexpanded data from a portion of the entire page that the expansion unit is unable to expand with the substitute data, such that the substituted data is placed at a position of the unexpanded data that the expansion unit is unable to expand, wherein the portion of the entire page comprising the unexpanded data that the expansion unit is unable to expand is less than the entire page.