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 2CC5F100A6 for ; Fri, 27 Sep 2013 15:19:57 +0000 (UTC) Received: (qmail 61926 invoked by uid 500); 27 Sep 2013 15:19:55 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 61907 invoked by uid 500); 27 Sep 2013 15:19:55 -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 61898 invoked by uid 99); 27 Sep 2013 15:19:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Sep 2013 15:19:54 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [81.169.146.160] (HELO mo-p00-ob.rzone.de) (81.169.146.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Sep 2013 15:19:48 +0000 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1380295167; l=2687; s=domk; d=lehmi.de; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References: Subject:To:MIME-Version:From:Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=h3eUpEmySjgyaaHEF0oH+fNnQNc=; b=Cry6qDR7Sm8CaHF3kkdzLrOZh1qQkMmESBRc3hwfkYp+nFPxLePJ1e2Znb7j7zKJM2V LJdsrQXV1d1AINiRak9zwAy3AaF02C9l1BtsZq129kfy3JQvdY8YEFEewsWLtkihkrtm6 d52/yxpQ8cEytrZS69hch/xf2Ux0jN16Qqg= X-RZG-AUTH: :LWIAZ0WpaN8UY5o8XRz0jOyrHsdEC+nAE10OdySrgHL6ku8V1wBZgD6TNIg= X-RZG-CLASS-ID: mo00 Received: from [192.168.1.8] (dslb-088-077-231-062.pools.arcor-ip.net [88.77.231.62]) by smtp.strato.de (RZmta 32.6 DYNA|AUTH) with (TLSv1.0:DHE-RSA-AES256-SHA encrypted) ESMTPSA id j0764cp8REYR7S for ; Fri, 27 Sep 2013 17:19:27 +0200 (CEST) Message-ID: <5245A1FA.8090308@lehmi.de> Date: Fri, 27 Sep 2013 17:19:22 +0200 From: Andreas Lehmkuehler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: users@pdfbox.apache.org Subject: Re: Problem with PDPixelMap getRGBImage - Something went wrong ... the pixelmap doesn't contain any data References: <00b701cebb8e$9c3c7100$d4b55300$@portaldedocumentos.com.br> In-Reply-To: <00b701cebb8e$9c3c7100$d4b55300$@portaldedocumentos.com.br> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I already answered your question here [1] BR Andreas Lehmk�hler [1] http://apache.markmail.org/thread/v57skp4vlts5nzyi Am 27.09.2013 16:33, schrieb Paulo Mello: > Can help me with this problem: > > Set 27, 2013 7:12:24 PM org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap > getRGBImage > > SEVERE: Something went wrong ... the pixelmap doesn't contain any data. > > Set 27, 2013 7:12:24 PM org.apache.pdfbox.util.operator.pagedrawer.Invoke process > > WARNING: getRGBImage returned NULL > > Set 27, 2013 7:12:24 PM org.apache.pdfbox.util.PDFStreamEngine processOperator > > INFO: unsupported/disabled operation: i > > My code: > > *public**static*List getPdfPagesAsImages(String pdfPath, *int*i) > > *throws*FileNotFoundException, IOException { > > *int*resolution = 185; > > File f = *new*File(pdfPath); > > FileInputStream is = *null*; > > is = *new*FileInputStream(f); > > System./out/.println("PDFUtils: file loaded in directory:" > > + pdfPath); > > List bImages = *new*ArrayList(); > > PDDocument pdfDocument = *null*; > > PDFParser parser = *new*PDFParser(is); > > _parser_.parse(); > > pdfDocument = parser.getPDDocument(); > > *if*(pdfDocument != *null*) { > > @SuppressWarnings("unchecked") > > List pages = (List) pdfDocument > > .getDocumentCatalog().getAllPages(); > > *int*j = 1; > > *for*(PDPage p : pages) { > > BufferedImage convertedImage = p.convertToImage( > > BufferedImage./TYPE_INT_RGB/, resolution); > > /saveImageToRepository/(i, j, convertedImage); > > j++; > > *if*(/isNegativeImage/(convertedImage)) { > > > bImages.add(/invertNegativeImage/(convertedImage)); > > } *else*{ > > bImages.add(convertedImage); > > } > > } > > } > > pdfDocument.close(); > > *return*bImages; > > } > > *private**static**void*saveImageToRepository(*int*i, *int*j, > > BufferedImage convertedImage) *throws*IOException { > > File outputfile = *new*File("C:/images/pdfpages/"+ i + j+ ".png"); > > ImageIO./write/(convertedImage, "png", outputfile); > > //PDFImageWriter > > } > > What I can programming to solve this warning. > > Because this exception my app stop to work but the imagem was created > > Thank you in advance for your attention > > cid:image003.png@01CEB971.9F63E490 > > > > *Paulo Mello* > paulo.mello@portaldedocumentos.com.br > > Tel: (11) 5591-2100 � Ramal 110 > Rua dos �ris, 150 - Mirand�polis - S�o Paulo - SP > CEP: 04049-040 > www.portaldedocumentos.com.br > > > > ** >