class ImageToPDF
{
    private ImageToPDF()
    {
    }
    
    public static void main(String[] args) throws IOException
    {<FILL_FUNCTION_BODY>}
}

        if (args.length != 2)
        {
            System.err.println("usage: " + ImageToPDF.class.getName() + " <image> <output-file>");
            System.exit(1);
        }
        
        String imagePath = args[0];
        String pdfPath = args[1];
        
        if (!pdfPath.endsWith(".pdf"))
        {
            System.err.println("Last argument must be the destination .pdf file");
            System.exit(1);
        }

        try (PDDocument doc = new PDDocument())
        {
            PDPage page = new PDPage();
            doc.addPage(page);

            // createFromFile is the easiest way with an image file
            // if you already have the image in a BufferedImage, 
            // call LosslessFactory.createFromImage() instead
            PDImageXObject pdImage = PDImageXObject.createFromFile(imagePath, doc);
            
            // draw the image at full size at (x=20, y=20)
            try (PDPageContentStream contents = new PDPageContentStream(doc, page))
            {
                // draw the image at full size at (x=20, y=20)
                contents.drawImage(pdImage, 20, 20);
                
                // to draw the image at half size at (x=20, y=20) use
                // contents.drawImage(pdImage, 20, 20, pdImage.getWidth() / 2, pdImage.getHeight() / 2); 
            }
            doc.save(pdfPath);
        }
    
<no_super_class>