class PrintImageLocations extends PDFStreamEngine
{
    /**
     * Default constructor.
     *
     * @throws IOException If there is an error loading text stripper properties.
     */
    public PrintImageLocations() throws IOException
    {
        addOperator(new Concatenate(this));
        addOperator(new DrawObject(this));
        addOperator(new SetGraphicsStateParameters(this));
        addOperator(new Save(this));
        addOperator(new Restore(this));
        addOperator(new SetMatrix(this));
    }

    /**
     * This will print the documents data.
     *
     * @param args The command line arguments.
     *
     * @throws IOException If there is an error parsing the document.
     */
    public static void main( String[] args ) throws IOException
    {<FILL_FUNCTION_BODY>}

    /**
     * This is used to handle an operation.
     *
     * @param operator The operation to perform.
     * @param operands The list of arguments.
     *
     * @throws IOException If there is an error processing the operation.
     */
    @Override
    protected void processOperator( Operator operator, List<COSBase> operands) throws IOException
    {
        String operation = operator.getName();
        if (OperatorName.DRAW_OBJECT.equals(operation))
        {
            COSName objectName = (COSName) operands.get( 0 );
            PDXObject xobject = getResources().getXObject( objectName );
            if( xobject instanceof PDImageXObject)
            {
                PDImageXObject image = (PDImageXObject)xobject;
                int imageWidth = image.getWidth();
                int imageHeight = image.getHeight();
                System.out.println("*******************************************************************");
                System.out.println("Found image [" + objectName.getName() + "]");
        
                Matrix ctmNew = getGraphicsState().getCurrentTransformationMatrix();
                float imageXScale = ctmNew.getScalingFactorX();
                float imageYScale = ctmNew.getScalingFactorY();

                // position in user space units. 1 unit = 1/72 inch at 72 dpi
                System.out.println("position in PDF = " + ctmNew.getTranslateX() + ", " + ctmNew.getTranslateY() + " in user space units");
                // raw size in pixels
                System.out.println("raw image size  = " + imageWidth + ", " + imageHeight + " in pixels");
                // displayed size in user space units
                System.out.println("displayed size  = " + imageXScale + ", " + imageYScale + " in user space units");
                // displayed size in inches at 72 dpi rendering
                imageXScale /= 72;
                imageYScale /= 72;
                System.out.println("displayed size  = " + imageXScale + ", " + imageYScale + " in inches at 72 dpi rendering");
                // displayed size in millimeters at 72 dpi rendering
                imageXScale *= 25.4f;
                imageYScale *= 25.4f;
                System.out.println("displayed size  = " + imageXScale + ", " + imageYScale + " in millimeters at 72 dpi rendering");
                System.out.println();
            }
            else if(xobject instanceof PDFormXObject)
            {
                PDFormXObject form = (PDFormXObject)xobject;
                showForm(form);
            }
        }
        else
        {
            super.processOperator( operator, operands);
        }
    }

    /**
     * This will print the usage for this document.
     */
    private static void usage()
    {
        System.err.println( "Usage: java " + PrintImageLocations.class.getName() + " <input-pdf>" );
    }

}

        if( args.length != 1 )
        {
            usage();
        }
        else
        {
            try (PDDocument document = Loader.loadPDF(new File(args[0])))
            {
                PrintImageLocations printer = new PrintImageLocations();
                int pageNum = 0;
                for( PDPage page : document.getPages() )
                {
                    pageNum++;
                    System.out.println( "Processing page: " + pageNum );
                    printer.processPage(page);
                }
            }
        }
    
<methods>public final void addOperator(org.apache.pdfbox.contentstream.operator.OperatorProcessor) ,public void beginMarkedContentSequence(org.apache.pdfbox.cos.COSName, org.apache.pdfbox.cos.COSDictionary) ,public void beginText() throws java.io.IOException,public void decreaseLevel() ,public void endMarkedContentSequence() ,public void endText() throws java.io.IOException,public org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceStream getAppearance(org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation) ,public org.apache.pdfbox.pdmodel.PDPage getCurrentPage() ,public int getGraphicsStackSize() ,public org.apache.pdfbox.pdmodel.graphics.state.PDGraphicsState getGraphicsState() ,public org.apache.pdfbox.util.Matrix getInitialMatrix() ,public int getLevel() ,public org.apache.pdfbox.pdmodel.PDResources getResources() ,public org.apache.pdfbox.util.Matrix getTextLineMatrix() ,public org.apache.pdfbox.util.Matrix getTextMatrix() ,public void increaseLevel() ,public void processOperator(java.lang.String, List<org.apache.pdfbox.cos.COSBase>) throws java.io.IOException,public void processPage(org.apache.pdfbox.pdmodel.PDPage) throws java.io.IOException,public void restoreGraphicsState() ,public void saveGraphicsState() ,public void setLineDashPattern(org.apache.pdfbox.cos.COSArray, int) ,public void setTextLineMatrix(org.apache.pdfbox.util.Matrix) ,public void setTextMatrix(org.apache.pdfbox.util.Matrix) ,public void showAnnotation(org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation) throws java.io.IOException,public void showForm(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject) throws java.io.IOException,public void showTextString(byte[]) throws java.io.IOException,public void showTextStrings(org.apache.pdfbox.cos.COSArray) throws java.io.IOException,public void showTransparencyGroup(org.apache.pdfbox.pdmodel.graphics.form.PDTransparencyGroup) throws java.io.IOException,public java.awt.geom.Point2D.Float transformedPoint(float, float) <variables>private static final Logger LOG,private org.apache.pdfbox.pdmodel.PDPage currentPage,private org.apache.pdfbox.pdmodel.font.PDFont defaultFont,private Deque<org.apache.pdfbox.pdmodel.graphics.state.PDGraphicsState> graphicsStack,private org.apache.pdfbox.util.Matrix initialMatrix,private boolean isProcessingPage,private int level,private final Map<java.lang.String,org.apache.pdfbox.contentstream.operator.OperatorProcessor> operators,private org.apache.pdfbox.pdmodel.PDResources resources