Image Functionality This tries out some new features of images. PDF files as images PDF files (or their pagecatcherised pals, .data files) can be used just like images. Below you should see a few little internet access icons; zoom in and you'll see they are vector. The original PDF is 1296x1296, so the rubbish at top right of the page is the unscaled one being drawn in the illustration below at (0,0). The preserveAspectRatio flag lets you place your image in a box and it will be centered intelligently, touching either the sides or the top depending on its own aspect ratio. The anchor attribute lets you determine which part of the image corresponds to the given x and y. You can choose an anchor from the standard compass points. The test below draws the 'square-ish' image in an 80x40 (wide-ish) box, with each anchor point. Now we repeat in a tall-ish box. Top row should be flush top, middle row should be in the middle, bottom row at bottom Draws the 40 x 40 image in an 80x80 box, with each anchor point. Draws the 40 x 40 gif image in an 80x80 box, with each anchor point. First attempt to place an image which has an artbox. We have created a PDF with MediaBox (the usual size measure) approx 300x400 points, and a 100x100 circle in top right corner, and instructed RML to draw it in a box of half size. This seems to work. Now we try to place it with the art box. The blue should leak out horribly to left and below, but the red circle should end up elliptical within the box. (In real life, the art box defines the 'area of interest' and there would be no stuff outside it). This isn't working yet. Also, we get an extraneous boundary box from drawPdfImage appearing at top right - shifted the wrong way. Now I will try and clip the silly image to something strange. 10 100 75 180 140 200 140 100 10 100 75 180 140 200 140 100