import java.io.FileOutputStream;
import com.lowagie.text.Document;
import com.lowagie.text.Image;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.PdfWriter;
public class MainClass {
public static void main(String[] args) throws Exception {
Document document = new Document();
PdfWriter.getInstance(document, new FileOutputStream("2.pdf"));
document.open();
Image jpg = Image.getInstance("dog.jpg");
jpg.scaleAbsolute(154, 94);
document.add(new Paragraph("scaleAbsolute(154, 94)"));
document.add(jpg);
document.close();
}
}