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 2BECE18EAD for ; Fri, 18 Mar 2016 17:13:42 +0000 (UTC) Received: (qmail 81089 invoked by uid 500); 18 Mar 2016 17:13:36 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 81066 invoked by uid 500); 18 Mar 2016 17:13:36 -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 81055 invoked by uid 99); 18 Mar 2016 17:13:36 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Mar 2016 17:13:36 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 32377180112 for ; Fri, 18 Mar 2016 17:13:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.699 X-Spam-Level: X-Spam-Status: No, score=0.699 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 0ueqWyDNHwZm for ; Fri, 18 Mar 2016 17:13:34 +0000 (UTC) Received: from mx2.healthcare.uiowa.edu (mx2.healthcare.uiowa.edu [129.255.126.115]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 868575F231 for ; Fri, 18 Mar 2016 17:13:34 +0000 (UTC) Received: from pps.filterd (hc-securemail2.healthcare.uiowa.edu [127.0.0.1]) by hc-securemail2.healthcare.uiowa.edu (8.15.0.59/8.15.0.59) with SMTP id u2IHDSo3023599 for ; Fri, 18 Mar 2016 12:13:28 -0500 Received: from hc-edge1.healthcare.uiowa.edu (hc-edge1.healthcare.uiowa.edu [129.255.126.22]) by hc-securemail2.healthcare.uiowa.edu with ESMTP id 21mgqyjcc1-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Fri, 18 Mar 2016 12:13:28 -0500 Received: from HC-HUB2.healthcare.uiowa.edu (129.255.112.195) by HC-EDGE1.healthcare.uiowa.edu (129.255.126.22) with Microsoft SMTP Server (TLS) id 14.3.266.1; Fri, 18 Mar 2016 12:13:05 -0500 Received: from hc-mailboxc1-n2.healthcare.uiowa.edu ([169.254.2.89]) by HC-HUB2.healthcare.uiowa.edu ([129.255.112.195]) with mapi id 14.03.0266.001; Fri, 18 Mar 2016 12:13:27 -0500 From: "Haddy, Diane E" To: "users@pdfbox.apache.org" Subject: display an image in pdf Thread-Topic: display an image in pdf Thread-Index: AdGBOC06n8oMDIbWS3WR8hCDFHo39w== Date: Fri, 18 Mar 2016 17:13:26 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [129.255.98.1] x-my-disclaimer: ready Content-Type: multipart/alternative; boundary="_000_D8C9DC7F8FACF44BBCCA8419DA862CF521444Fhcmailboxc1n2heal_" MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5600 definitions=5800 signatures=585085 --_000_D8C9DC7F8FACF44BBCCA8419DA862CF521444Fhcmailboxc1n2heal_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello I have two questions. I would like to display a .gif image into a pdf. Ca= n I use PDJpeg class for .gif image? And in this piece of code, which I got form the internet: String imageName =3D "/images/arrow.gif; PDXObjectImage image =3D new PDJpeg(doc, new FileInputStream(imageName)); PDPageContentStream content =3D new PDPageContentStream (doc, page) content.drawImage(image, 200, 500) content.close(); doc.save(fileName) doc.close(); the file path is in the web directory of my java project. However when I r= un this, I get FileNotFoundException. Any suggestions? Thank you Diane Diane Haddy Health Care Information Systems Application Developer 3281 Ridgeway Dr Coralville, IA 52241 Phone (319) 384-9725 ________________________________ Notice: This UI Health Care e-mail (including attachments) is covered by th= e Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidenti= al and may be legally privileged. If you are not the intended recipient, y= ou are hereby notified that any retention, dissemination, distribution, or = copying of this communication is strictly prohibited. Please reply to the = sender that you have received the message in error, then delete it. Thank = you. ________________________________ --_000_D8C9DC7F8FACF44BBCCA8419DA862CF521444Fhcmailboxc1n2heal_--