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 D6BA918094 for ; Wed, 22 Jul 2015 07:02:12 +0000 (UTC) Received: (qmail 92632 invoked by uid 500); 22 Jul 2015 07:02:12 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 92607 invoked by uid 500); 22 Jul 2015 07:02:12 -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 92596 invoked by uid 99); 22 Jul 2015 07:02:12 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jul 2015 07:02:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D159BC019D for ; Wed, 22 Jul 2015 07:02:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.792 X-Spam-Level: *** X-Spam-Status: No, score=3.792 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_BADIPHTTP=2, KAM_LAZY_DOMAIN_SECURITY=1, NORMAL_HTTP_TO_IP=0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id TNc05VXanHLi for ; Wed, 22 Jul 2015 07:01:59 +0000 (UTC) Received: from mailout03.t-online.de (mailout03.t-online.de [194.25.134.81]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id D4DD82519B for ; Wed, 22 Jul 2015 07:01:58 +0000 (UTC) Received: from fwd23.aul.t-online.de (fwd23.aul.t-online.de [172.20.26.128]) by mailout03.t-online.de (Postfix) with SMTP id 980554B6D71 for ; Wed, 22 Jul 2015 09:00:50 +0200 (CEST) Received: from [192.168.2.102] (rIp-t4ZvQhxQBS4OrEkvQO-Jq17m5cOQlNi7L9YaPsWnjB10gq4bKX3ycl1EO+YZOv@[217.231.131.38]) by fwd23.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1ZHo1J-0wBlfE0; Wed, 22 Jul 2015 09:00:49 +0200 Subject: Re: High CPU load an memory usage, when converting PDF to Image To: users@pdfbox.apache.org References: <55AF261A.3000504@t-online.de> From: Tilman Hausherr Message-ID: <55AF3FBB.5020505@t-online.de> Date: Wed, 22 Jul 2015 09:01:15 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-ID: rIp-t4ZvQhxQBS4OrEkvQO-Jq17m5cOQlNi7L9YaPsWnjB10gq4bKX3ycl1EO+YZOv X-TOI-MSGID: b719a4b5-8199-426f-860b-0c28411322fe Thanks. According to virustotal.com, one (Dr.Web) of 51 programs claims that it is a virus (SCRIPT.Virus). I've send it to them for analysis. In the meantime, I'm also trying to display that file with 2.0 and nothing happens except my CPU heating the room. Either we have a new bug, or the file is really very complex. Reminds me that I have the same problem with this file: http://bugs.ghostscript.com/show_bug.cgi?id=692158 Tilman Am 22.07.2015 um 08:11 schrieb von Daak, Frank: > Hi, > > ah, ok. > > Please find the pdf file at the following location: > http://82.165.25.239/buggypdf_nurgrafik.pdf > > Greetings, > Frank > > > > Am 22.07.2015 um 07:11 schrieb Tilman Hausherr : > >> Hi, >> >> It is not possible to attach PDFs here, please upload it somewhere so that we can have a look. >> >> Tilman >> >> Am 22.07.2015 um 06:46 schrieb von Daak, Frank: >>> Hello! >>> >>> We are running a business web application, that is using pdfbox to convert pdf-files to images, using PDPage.convertToImage(). >>> When we try to convert the attached pdf, the CPU load of tomcat is raising and it seems, that the process hangs. The tomcat process is no more responsive and after a long while, we get an memory overflow. Also the server load is very high meanwhile. >>> We have seen this on pdfbox 1.8.8, 1.8.9 and 1.8.11-SNAPSHOT >>> >>> Do you have an idea, how to prevent this? >>> >>> Our code looks like this: >>> >>> private void convertPDF2JPG(File inFile, String outFile) throws Exception { >>> PDDocument pdf = PDDocument.load(inFile); >>> List allPages = (List)pdf.getDocumentCatalog().getAllPages(); >>> >>> for(PDPage pdPage: allPages) { >>> int resolution = 220; >>> BufferedImage bufferedImage = pdPage.convertToImage(BufferedImage.TYPE_INT_RGB, resolution); >>> Graphics2D bufImageGraphics = bufferedImage.createGraphics(); >>> bufImageGraphics.drawImage(bufferedImage, 0, 0, null); >>> bufImageGraphics.dispose(); >>> >>> convertAnyImage2JPG(bufferedImage, new File(outFile)); >>> } >>> >>> } >>> >>> >>> Thank you very much and best regards, >>> Frank >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org >>> For additional commands, e-mail: users-help@pdfbox.apache.org > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org > For additional commands, e-mail: users-help@pdfbox.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org