pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Franco Fellicò <fra...@ffellico.com>
Subject Can you help me ?
Date Sat, 25 May 2013 07:38:06 GMT
I am using PdfBox with the following code:

     . . . .
     . . . .
     createImage(fil, outfile, npag);
     try {
       jPanel2.removeAll();
       File ff = new File(outfile + ".jpg");
       myimage = ImageIO.read(ff);
     } catch (Exception e) {
       System.out.println(e.getMessage());
     }
     mypic = new ImagePanel(myimage);
     jPanel2.add(mypic);
     . . . .
     . . . .


   private void createImage(String fil, String out, int npag) {
     PDDocument pdf;
     try {
       pdf = PDDocument.load(fil);
       PDFImageWriter mywri = new PDFImageWriter();
       mywri.writeImage(pdf, "jpg", null, npag, npag, out, 
BufferedImage.TYPE_3BYTE_BGR, 254);
       pdf.close();
     } catch (IOException ex) {
       System.out.println(ex.getMessage());
     }
   }

then if the program run on my iMac or on a windows 7 OS the IMAGE is OK 
as you can see
in the correct.png I attached here.

if I use it on my macBook pro the IMAGE is incorrect (look at the 
incorrect.png file).

Both the mac computers have OSX mountains and the pdfbox library are the 
same.

Where is the problem?

Thank you from Franco Fellico in Italy


Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message