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 77E17D7E3 for ; Mon, 12 Nov 2012 14:40:36 +0000 (UTC) Received: (qmail 72642 invoked by uid 500); 12 Nov 2012 14:40:36 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 72466 invoked by uid 500); 12 Nov 2012 14:40: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 72455 invoked by uid 99); 12 Nov 2012 14:40:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2012 14:40:35 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [195.80.174.110] (HELO ares.gi-bon.sk) (195.80.174.110) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2012 14:40:28 +0000 In-Reply-To: References: To: users@pdfbox.apache.org MIME-Version: 1.0 Subject: Re: Reset Page Rotation (w/o actually rotating the page) X-KeepSent: BF7D1EFD:A38231A2-C1257AB4:00501AB9; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.5.3 September 15, 2011 Message-ID: From: jlonc@gi-bon.sk Date: Mon, 12 Nov 2012 15:40:08 +0100 X-MIMETrack: Serialize by Router on Ares/GI-BON/SK(Release 8.5.3FP1 HF206|May 22, 2012) at 12.11.2012 15:40:28, Serialize complete at 12.11.2012 15:40:28 Content-Type: multipart/alternative; boundary="=_alternative 00509450C1257AB4_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 00509450C1257AB4_= Content-Type: text/plain; charset="US-ASCII" hi gilad, i think you already got answer. the best way is to read findRotation() and then recalculate coordinates of rectangle you want to add. this is very simple and easy to do. i don't think you will find any simpler solution. Best regards Juraj Lonc From: Gilad Denneboom To: "users@pdfbox.apache.org" , Date: 12. 11. 2012 15:33 Subject: Re: Reset Page Rotation (w/o actually rotating the page) Any other ideas from anyone? On Sun, Nov 11, 2012 at 7:08 PM, Duane Nickull < duane@technoracle-systems.com> wrote: > THat would still involve using the findRotation() method to determine if > if it rotated then using another method to rotate it. It should be only a > few hours work at most. I believe there is a setRotation() method in the > same class. > > Duane Nickull > *********************************** > Technoracle Advanced Systems Inc. > Consulting and Contracting; Proven Results! > i. Neo4J, PDF, Java, LiveCycle ES, Flex, AIR, CQ5 & Mobile > b. http://technoracle.blogspot.com > t. @duanechaos > "Don't fear the Graph! Embrace Neo4J" > > > > > > > On 2012-11-10 2:00 PM, "Gilad Denneboom" > wrote: > > >Thanks for the reply, but that's not exactly what I mean... I'm trying > >avoiding having to write such a utility class (as it proves quite complex) > >by simply resetting the rotation setting of the page, since my code works > >fine with non-rotated pages. So I want to set the rotation to 0, without > >actually rotating the contents of the page. Possible? > > > > > >On Sat, Nov 10, 2012 at 6:43 PM, Duane Nickull < > >duane@technoracle-systems.com> wrote: > > > >> There is a method in the API's called CreateLandscapePDF() that can > >>make a > >> page landscape (presume that is what you mean by rotated). PDPage also > >> has a findRotation() method if you require data. YOu may have to > >>build > >> a utility class that can re-calculate the x, y, height, width coords and > >> call it based on the results of the findRotation() method. > >> > >> Hope this helps. > >> > >> Duane > >> > >> > >> *********************************** > >> Technoracle Advanced Systems Inc. > >> Consulting and Contracting; Proven Results! > >> i. Neo4J, PDF, Java, LiveCycle ES, Flex, AIR, CQ5 & Mobile > >> b. http://technoracle.blogspot.com > >> t. @duanechaos > >> "Don't fear the Graph! Embrace Neo4J" > >> > >> > >> > >> > >> > >> > >> On 2012-11-10 6:04 AM, "Gilad Denneboom" > >> wrote: > >> > >> >Hi guys, > >> > > >> >I hope someone can help me out with this annoying issue... > >> >I'm adding highlights to a page and they come out in the wrong > >>location. > >> >I've discovered the reason is that some pages are rotated, but the > >> >coordinates of the highlights are not in the rotated user space. > >> >The ideal solution for me would be to reset the rotation definition of > >>the > >> >page without actually rotating it... The only other option I can think > >>of > >> >would be to convert the coordinates I have, which is quite a complex > >> >operation, it seems. > >> > > >> >Any ideas on how to do that? > >> > > >> >Thanks in advance! > >> >Gilad > >> > >> > >> > > > --=_alternative 00509450C1257AB4_=--