Vote count: 0 I've inherited some code that hand-rolls PDF files. One of the things this code does, is that a large image is inserted into the PDF as a resource, and then pieces of that image are cropped in the PDF command stream and drawn separately. For example, if the large image is 1000 x 400 pixels, the code draws a chunk extracted from the top left of the large image ((0, 0) to (250, 200)) and then next to that draws another chunk extracted from the top middle of the large image ((250, 0), (500, 200)) (in this post I'm describing the crop coordinates using standard image coordinate system with origin in top-left). The way the code does this, is to create a secondary XObject that just d...
ادامه مطلب