com.cete.dynamicpdf.pageelements
Class Image


Example: The following example will place an image on the page and then set the Y scale to twice as much as the X scale.

 import com.cete.dynamicpdf.*;
 import com.cete.dynamicpdf.pageelements.*;
  
 public class MyClass{
       public static void Main(String args[]){
       
           // Create a PDF Document
           Document document = new Document();
 
           / Create a Page and add it to the document
           Page page = new Page();
           document.getPages().add(page);
           
           // Create an image
           Image image = new Image("[physicalpath]/MyImage.jpg", 0, 0);
 
           // Add the image to the page
           page.getElements().add(image);  
 
           // Save the PDF
           document.draw("[physicalpath]/MyDocument.pdf");
       }
 }