[ 
https://issues.apache.org/jira/browse/PDFBOX-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hue Wai Kee updated PDFBOX-2369:
--------------------------------
    Description: 
I may i know how to convert pdf to image using pdfbox 2.0.0 ?

List<PDPage> kids = 
PDDocument.load(fullPath).getDocumentCatalog().getPages().getKids();
int count=1;
         for(PDPage page : kids) {  
                           BufferedImage img = 
page.convertToImage(BufferedImage.TYPE_INT_RGB,128);
                           File imageFile = new File( filePath + File.separator 
+ FilenameUtils.getBaseName(filename) + File.separator +          
FilenameUtils.getBaseName(filename) + "_" + count++ + ".jpg" );
                           imageFile.mkdirs();
                           ImageIO.write(img, "jpg",imageFile);
         }

i using pdfbox-2.0.0-20140919.220435-569
The method convertToImage(int, int) is undefined for the type PDPage. 

  was:
I may i know how to convert pdf to image using pdfbox 2.0.0 ?

List<PDPage> kids = 
PDDocument.load(fullPath).getDocumentCatalog().getPages().getKids();
                      int count=1;
                      
                      for(PDPage page : kids) {   ///// iterate
                           BufferedImage img = 
page.convertToImage(BufferedImage.TYPE_INT_RGB,128);
                           File imageFile = new File( filePath + File.separator 
+ FilenameUtils.getBaseName(filename) + File.separator + 
FilenameUtils.getBaseName(filename) + "_" + count++ + ".jpg" );
                           imageFile.mkdirs();
                           ImageIO.write(img, "jpg",imageFile);
                           }

i using pdfbox-2.0.0-20140919.220435-569
The method convertToImage(int, int) is undefined for the type PDPage. 


> how to convert pdf to image
> ---------------------------
>
>                 Key: PDFBOX-2369
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2369
>             Project: PDFBox
>          Issue Type: Test
>            Reporter: Hue Wai Kee
>             Fix For: 2.0.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> I may i know how to convert pdf to image using pdfbox 2.0.0 ?
> List<PDPage> kids = 
> PDDocument.load(fullPath).getDocumentCatalog().getPages().getKids();
> int count=1;
>        for(PDPage page : kids) {  
>                          BufferedImage img = 
> page.convertToImage(BufferedImage.TYPE_INT_RGB,128);
>                          File imageFile = new File( filePath + File.separator 
> + FilenameUtils.getBaseName(filename) + File.separator +          
> FilenameUtils.getBaseName(filename) + "_" + count++ + ".jpg" );
>                          imageFile.mkdirs();
>                          ImageIO.write(img, "jpg",imageFile);
>          }
> i using pdfbox-2.0.0-20140919.220435-569
> The method convertToImage(int, int) is undefined for the type PDPage. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to