* Adds a PDF XObject (a bitmap) to the PDF that will later be referenced.
* @param url URL of the bitmap
* @param pos Position of the bitmap
*/
protected void putImage(String url, Rectangle2D pos) {
PDFXObject xobject = pdfDoc.getImage(url);
if (xobject != null) {
float w = (float) pos.getWidth() / 1000f;
float h = (float) pos.getHeight() / 1000f;
placeImage((float)pos.getX() / 1000f,
(float)pos.getY() / 1000f, w, h, xobject.getXNumber());
return;
}
url = ImageFactory.getURL(url);
ImageFactory fact = ImageFactory.getInstance();