1. A document processing apparatus comprising: an extraction unit configured to extract a leading edge of a first object at an end of a first page, and a leading edge of a second object at an end on the side facing the first page end, on a second page following the first page; a merging unit configured to merge, when a result of overlapping the leading edge of the first object with the leading edge of the second object satisfies a certain condition, the leading edge of the first object with the leading edge of the second object; and a reduction unit configured to reduce the objects merged by the merging unit so that they fit into one page.