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 3843017A78 for ; Tue, 22 Sep 2015 18:29:02 +0000 (UTC) Received: (qmail 71895 invoked by uid 500); 22 Sep 2015 18:28:49 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 71873 invoked by uid 500); 22 Sep 2015 18:28:49 -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 71862 invoked by uid 99); 22 Sep 2015 18:28:49 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Sep 2015 18:28:49 +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 05BF718098B for ; Tue, 22 Sep 2015 18:28:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.975 X-Spam-Level: X-Spam-Status: No, score=0.975 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.006, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id sSykRRTRd20V for ; Tue, 22 Sep 2015 18:28:39 +0000 (UTC) Received: from mailout09.t-online.de (mailout09.t-online.de [194.25.134.84]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 97F7023074 for ; Tue, 22 Sep 2015 18:28:38 +0000 (UTC) Received: from fwd30.aul.t-online.de (fwd30.aul.t-online.de [172.20.26.135]) by mailout09.t-online.de (Postfix) with SMTP id 2D3564F8565 for ; Tue, 22 Sep 2015 20:28:13 +0200 (CEST) Received: from [192.168.2.102] (JlT7NUZYQh0srjWI842GdkAMuJ4lRWAqwmIVQf3HmfX3lDJSgIvKGigPr3LPEnoQZR@[217.231.141.33]) by fwd30.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1ZeSIW-2NUXPk0; Tue, 22 Sep 2015 20:28:12 +0200 Subject: Re: Image Rotation In PDFBox 2 To: users@pdfbox.apache.org References: From: Tilman Hausherr Message-ID: <56019DD0.6000004@t-online.de> Date: Tue, 22 Sep 2015 20:28:32 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-ID: JlT7NUZYQh0srjWI842GdkAMuJ4lRWAqwmIVQf3HmfX3lDJSgIvKGigPr3LPEnoQZR X-TOI-MSGID: d7787239-451e-495e-bb81-d2729a31200d Just call transform() with a Matrix that does your rotation before drawing - because that is what the deprecated method does. Note that the rotation is done around the lower left axis, so you have to do a translation too. Matrix can be created from an AffineTransform. Tilman Am 22.09.2015 um 20:22 schrieb Evan Williams: > I know I am being super, super dumb here, but, given the deprecation > of the *drawXObject(PDXObject > > xobject, AffineTransform > > transform)*method > of *PDPageContentStream*, how does one add an image with rotation to the > page > > I know I could just read the image into a buffered image, rotate it, and > create an input stream from that, but one would think there is a better way. > > Is there a better way > > Thanks. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org