Skip to main content
deleted 20 characters in body
Source Link
Ömer Erden
  • 8.9k
  • 6
  • 39
  • 48

May this help you for adding image and also image caption to pdf.

 Image image1 = Image.getInstance("sample.png");  image1.setAlignment(Element.ALIGN_CENTER);  image1.scaleAbsolute(450, 250);  //Add to document  document.add(image1);  Paragraph imgCaption = new Paragraph(" Sample image-1", imgcaption);  Summary.setAlignment(Element.ALIGN_LEFT);  Summary.setSpacingAfter(10f);  document.add(imgCaption); 

May this help you for adding image and also image caption to pdf.

 Image image1 = Image.getInstance("sample.png");  image1.setAlignment(Element.ALIGN_CENTER);  image1.scaleAbsolute(450, 250);  //Add to document  document.add(image1);  Paragraph imgCaption = new Paragraph(" Sample image-1", imgcaption);  Summary.setAlignment(Element.ALIGN_LEFT);  Summary.setSpacingAfter(10f);  document.add(imgCaption); 

May this help you for adding image and also image caption to pdf.

Image image1 = Image.getInstance("sample.png"); image1.setAlignment(Element.ALIGN_CENTER); image1.scaleAbsolute(450, 250); //Add to document document.add(image1); Paragraph imgCaption = new Paragraph(" Sample image-1", imgcaption); Summary.setAlignment(Element.ALIGN_LEFT); Summary.setSpacingAfter(10f); document.add(imgCaption); 
Source Link

May this help you for adding image and also image caption to pdf.

 Image image1 = Image.getInstance("sample.png"); image1.setAlignment(Element.ALIGN_CENTER); image1.scaleAbsolute(450, 250); //Add to document document.add(image1); Paragraph imgCaption = new Paragraph(" Sample image-1", imgcaption); Summary.setAlignment(Element.ALIGN_LEFT); Summary.setSpacingAfter(10f); document.add(imgCaption);