code: protected Element createImageElement(float x, float y, float width, float height, ImageResource resource) throws IOException
      {
          StringBuilder pstyle = new StringBuilder("position:absolute;");
          pstyle.append("left:").append(x).append(UNIT).append(';');
          pstyle.append("top:").append(y).append(UNIT).append(';');
          pstyle.append("width:").append(width).append(UNIT).append(';');
          pstyle.append("height:").append(height).append(UNIT).append(';');
          //pstyle.append("border:1px solid red;");
          
          Element el = doc.createElement("img");
          el.setAttribute("style", pstyle.toString());
  
          String imgSrc = config.getImageHandler().handleResource(resource);
  
          if (!disableImageData && !imgSrc.isEmpty())
              el.setAttribute("src", imgSrc);
          else
              el.setAttribute("src", "");
          
          return el;
      }
docs: Creates an element that represents an image drawn at the specified coordinates in the page.
  @param x the X coordinate of the image
  @param y the Y coordinate of the image
  @param width the width coordinate of the image
  @param height the height coordinate of the image
  @param type the image type: <code>"png"</code> or <code>"jpeg"</code>
  @param resource the image data depending on the specified type
  @return