Recent advances in digital press technology have enabled the creation of high-quality personalized documents, with the potential of generating an entire batch of one-of-a-kind documents. Even though digital presses are capable of printing such document sets as fast as they would print regular press jobs, raster image processing might possibly be performed for every different page in the job. Such process demands a large computational effort and it is therefore interesting to gather repeated images that are used throughout all documents and rasterize them as few times as possible. Moreover, performing such process separately from document production in the publishing workflow allows optimization to be performed prior to final printing, thus allowing it to take press hardware specifics into account, and reducing the time taken for it to produce the final output. This paper describes techniques to perform this task using PPML as the document description language, as well as the main issues concerning this kind of document optimization. Several gathering policies are described along with explanatory examples. We also provide and discuss experimental data supporting the use of such strategie.