Return-Path: X-Original-To: apmail-pdfbox-dev-archive@www.apache.org Delivered-To: apmail-pdfbox-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BFE2E11B40 for ; Thu, 1 May 2014 12:51:24 +0000 (UTC) Received: (qmail 14628 invoked by uid 500); 1 May 2014 12:51:24 -0000 Delivered-To: apmail-pdfbox-dev-archive@pdfbox.apache.org Received: (qmail 14324 invoked by uid 500); 1 May 2014 12:51:18 -0000 Mailing-List: contact dev-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list dev@pdfbox.apache.org Received: (qmail 14056 invoked by uid 99); 1 May 2014 12:51:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 May 2014 12:51:15 +0000 Date: Thu, 1 May 2014 12:51:15 +0000 (UTC) From: "Tilman Hausherr (JIRA)" To: dev@pdfbox.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PDFBOX-958) convertToImage mangles images which were in the PDF MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PDFBOX-958?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1398= 6546#comment-13986546 ]=20 Tilman Hausherr commented on PDFBOX-958: ---------------------------------------- Is there anybody who can access the PDF of this issue, and if yes, what URL= works? I get an error. I suspect it has something to do with url-encoding = of the "(R)". > convertToImage mangles images which were in the PDF > --------------------------------------------------- > > Key: PDFBOX-958 > URL: https://issues.apache.org/jira/browse/PDFBOX-958 > Project: PDFBox > Issue Type: Bug > Affects Versions: 1.2.1, 1.4.0, 1.5.0 > Environment: RHEL5 and WinXP, java version "1.6.0_23" > Reporter: Eric Schwarzenbach > Assignee: Andreas Lehmk=C3=BChler > Priority: Critical > Fix For: 1.6.0 > > Attachments: Image of Page 13.jpeg, Image of Page 13.png, Wrycan= =C2=AE Lorem Ipsum Test.pdf > > > Of the PDFs we've tried running through PDFBox and generating page images= , a number of them (coming from disparate sources and method of creation) s= eem to produce images where an image that was embedded in the page of the P= DF shows somewhat mangled. It seems to be divided by horizontal stripes, wh= ere some stripes look normal, others seem to have some kind of "smearing" e= ffect going on. See attached images and original PDF (image is of page 13). > I marked this as critical as we are trying to use PDFBox in a project whe= re page images are crucial, and inability to produce reasonable looking pag= e images is pretty much a deal breaker.=20 > The code we use to extract the images looks more or less like the followi= ng: > =09=09=09=09=09BufferedImage image =3D page.convertToImage(); > =09=09=09=09=09 > =09=09=09=09=09SmartDeferredFileOutputStream outStream =3D new SmartDefer= redFileOutputStream(); > =09=09=09=09=09String[] writerFormatNames =3D ImageIO.getWriterFormatName= s(); > =09=09=09=09=09ImageIO.write(image, "jpeg", outStream); > =09=09=09=09=09outStream.close() > We've also tried specifying "png". In both "jpg" and "png" cases we get a= n image file that is indeed the correct format, and both images look exactl= y the same.=20 -- This message was sent by Atlassian JIRA (v6.2#6252)