Examples of PdfImageData


Examples of org.jpedal.objects.PdfImageData

        decode_pdf.decodePage( page );
       
        //get the PdfImages object which now holds the images.
        //binary data is stored in a temp directory and we hold the
        //image name and other info in this object
        PdfImageData pdf_images = decode_pdf.getPdfImageData();
       
        //image count (note image 1 is item 0, so any loop runs 0 to count-1)
        int image_count = pdf_images.getImageCount();
       
        if(image_count>0){
          target=output_dir+page+separator;
          File targetExists=new File(target);
          if(!targetExists.exists())
            targetExists.mkdir();
        }
       
        //work through and save each image
        for( int i = 0;i < image_count;i++ ){
         
          String image_name =pdf_images.getImageName( i );
          BufferedImage image_to_save;
         
          float x1=pdf_images.getImageXCoord(i);
          float y1=pdf_images.getImageYCoord(i);
          float w=pdf_images.getImageWidth(i);
          float h=pdf_images.getImageHeight(i);
         
          try{
           
            image_to_save =decode_pdf.getObjectStore().loadStoredImage"CLIP_"+image_name );
           
View Full Code Here

Examples of org.jpedal.objects.PdfImageData

        decode_pdf.decodePage( page );
       
        //get the PdfImages object which now holds the images.
        //binary data is stored in a temp directory and we hold the
        //image name and other info in this object
        PdfImageData pdf_images = decode_pdf.getPdfImageData();
       
        //image count (note image 1 is item 0, so any loop runs 0 to count-1)
        int image_count = pdf_images.getImageCount();
       
        String target=output_dir+separator;
        if(downsampled)
          target=target+"downsampled"+separator+page+separator;
        else
          target=target+"normal"+separator+page+separator;
       
        //tell user
        if( image_count > 0 ){
         
         
          //create a directory for page
          File page_path = new File( target );
          if( page_path.exists() == false )
            page_path.mkdirs();
         
         
          //do it again as some OS struggle with creating nested dirs
          page_path = new File( target );
          if( page_path.exists() == false )
            page_path.mkdirs();
         
        }
       
        //work through and save each image
        for( int i = 0;i < image_count;i++ )
        {
          String image_name = pdf_images.getImageName( i );
          BufferedImage image_to_save;
         
          try
          {
            if(downsampled){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.