Return-Path: X-Original-To: apmail-pdfbox-users-archive@www.apache.org Delivered-To: apmail-pdfbox-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9F4F610C43 for ; Sat, 15 Jun 2013 11:57:43 +0000 (UTC) Received: (qmail 54881 invoked by uid 500); 15 Jun 2013 11:57:43 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 54703 invoked by uid 500); 15 Jun 2013 11:57:42 -0000 Mailing-List: contact users-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@pdfbox.apache.org Delivered-To: mailing list users@pdfbox.apache.org Received: (qmail 54695 invoked by uid 99); 15 Jun 2013 11:57:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Jun 2013 11:57:41 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Received: from [81.169.146.160] (HELO mo-p00-ob.rzone.de) (81.169.146.160) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Jun 2013 11:57:33 +0000 X-RZG-AUTH: :LWIAZ0WpaN8UY5o8XRz0jOyrHsdEC+nAE10OdySrgHL6ku8V1wBZgRhjjYw= X-RZG-CLASS-ID: mo00 Received: from [192.168.1.12] (dslb-088-077-230-061.pools.arcor-ip.net [88.77.230.61]) by smtp.strato.de (jorabe mo31) (RZmta 31.27 DYNA|AUTH) with ESMTPA id e05cdap5FBjT5E for ; Sat, 15 Jun 2013 13:56:53 +0200 (CEST) Message-ID: <51BC5684.8000308@lehmi.de> Date: Sat, 15 Jun 2013 13:56:52 +0200 From: Andreas Lehmkuehler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: users@pdfbox.apache.org Subject: Re: Can you help me ? References: <51A06A5E.9030702@ffellico.com> In-Reply-To: <51A06A5E.9030702@ffellico.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, Am 25.05.2013 09:38, schrieb Franco Fellic�: > 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. Your attachments didn't make it due to some restrictions. Please upload them somewhere (sharehoster, website ...) so that we can download them. > 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? Without the pdf in question it's hard to say, but let me guess. You're using different versions of the jdk (1.6 vs. 1.7) in your environments, aren't you? > Thank you from Franco Fellico in Italy BR Andreas Lehmk�hler