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 E898C18BDF for ; Mon, 7 Mar 2016 08:51:18 +0000 (UTC) Received: (qmail 88841 invoked by uid 500); 7 Mar 2016 08:51:13 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 88816 invoked by uid 500); 7 Mar 2016 08:51:13 -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 88804 invoked by uid 99); 7 Mar 2016 08:51:13 -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; Mon, 07 Mar 2016 08:51:13 +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 AE22318027E for ; Mon, 7 Mar 2016 08:51:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id MP_9Swpub4nh for ; Mon, 7 Mar 2016 08:51:10 +0000 (UTC) Received: from mail-yw0-f182.google.com (mail-yw0-f182.google.com [209.85.161.182]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 0BBBD5FADC for ; Mon, 7 Mar 2016 08:51:10 +0000 (UTC) Received: by mail-yw0-f182.google.com with SMTP id g127so89037436ywf.2 for ; Mon, 07 Mar 2016 00:51:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=zEB71VCcbjp6bgwHAU3V07L3FPVLv6g6iFYrGxwt7vY=; b=zD1UvQS1Ua+CnKLj9BLbBlcd2YqbyuMwnvH4XdsS9ce/BU+0IKtTlTy9xwuas4NITk jNovwZde4KLAvTDDM6pkYMegNp4cnKwHB0Dp0dMyFFWAydWkhrZVSqockJbJjwc3eLWl jEQSS0DTMBSg51oBFhmveRBsjE6fzVi1/6zLxToXUKbOJAeZ8w2SZ3EhiKddET4e7riB 5ucE68ARJoq9JaiJ6sm9rZtfx9v7901wIHu+U7skUVPcaIyvYa5QZD2T6lp8rBVufKdq wxKD03yQ7tnL0ddITulJ80qgaM9WWsi5OMkkCXRbcKFIy4lnS67usdoYD4frm/26eIpr 2+BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=zEB71VCcbjp6bgwHAU3V07L3FPVLv6g6iFYrGxwt7vY=; b=mJ/8xbmk2Uc4aTCUW0xXdykAklP+hACxdt+sQcU1OMqhe4wjJyKaDTgBi1eeaCp31p fnvS3WrRrH5TOMXEqz1x6a/7/km1Nt6kMTXa/lRyv2GZNLAsXbQUuHoQqsNz8zHEROll qi0Q5Xz4AZHOCFEI6qBIEK2x6zFtsauJ0mUDkbM5c0G8xXprz9hrcN9DnKevPElbdc40 wZuPX/4hXlEBaJnx+ju3xkOCG+ufXd77SsNJJJa59SIijdakmwnCpIPxu4TIDnzKLQbK BF4YKmiMf6aYs5MhgWdcuHfWZxHhiIyWC2Skv6ERqZiBKku2lcIHAZrAi5L8J7IIz73E eOrw== X-Gm-Message-State: AD7BkJIXL+J0yUuZmQk6YuBJItNPucOPbej1g26PDndqAVplgBH3OWefJclijIAIeGFyuzzyirGh5iV/f/8qug== X-Received: by 10.129.83.196 with SMTP id h187mr11069411ywb.319.1457340663436; Mon, 07 Mar 2016 00:51:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.13.199.69 with HTTP; Mon, 7 Mar 2016 00:50:44 -0800 (PST) In-Reply-To: References: <69E0D904-3442-4C2D-A14D-EC5B5E0E85CD@fileaffairs.de> From: Gilad Denneboom Date: Mon, 7 Mar 2016 09:50:44 +0100 Message-ID: Subject: Re: Rotating a new annotation to match the page's rotation To: "users@pdfbox.apache.org" Content-Type: multipart/alternative; boundary=001a114d6f268f9a3d052d719038 --001a114d6f268f9a3d052d719038 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Does that help anyone find a solution for this issue? I think it could be useful for more operations within PDFBox, relating to rotated pages. On Tue, Mar 1, 2016 at 2:17 PM, Gilad Denneboom wrote: > OK, here's a file that demonstrates the issue. I'm attaching the original > as well as the version highlighted using PDFBox and the one I highlighted > manually in Acrobat, for comparison purposes. > > The details of the highlight added in PDFBox are: > Rect:[104.73436,751.22327,147.8024,757.2535] > > Quads:[104.73436,755.2535,147.8024,755.2535,104.73436,749.22327,147.8024,= 749.22327] > > I hope this is sufficient... If not, please let me know. > =E2=80=8B > Landscape page_highlighted in Acrobat.pdf > > =E2=80=8B=E2=80=8B > Landscape page.pdf > > =E2=80=8B=E2=80=8B > Landscape page_highlighted.pdf > > =E2=80=8B > > On Wed, Feb 24, 2016 at 2:30 PM, Gilad Denneboom < > gilad.denneboom@gmail.com> wrote: > >> It's a highlight. >> >> Let me give you the background. I'm using a variation on >> PrintTextLocation to find the locations I want to highlight and then add >> them. As I wrote, it works very well in pages with zero rotation, but th= e >> results are skewed when the pages are rotated. >> What I mean by skewed is that they appear on the location of the page >> where the text would have have been had it not been rotated, if that mak= es >> sense. >> I'll try to set up a simple example that demonstrates this issue and >> share it. >> >> On Wed, Feb 24, 2016 at 1:34 PM, Maruan Sahyoun >> wrote: >> >>> Hi, >>> >>> what type of annotation are you trying to put on the page. I could >>> create a little sample placing an annotation at the (visual) upper left >>> corner of a portrait and landscape page. >>> >>> BR >>> Maruan >>> >>> > Am 24.02.2016 um 09:34 schrieb Gilad Denneboom < >>> gilad.denneboom@gmail.com>: >>> > >>> > No one has any ideas? ... >>> > >>> > On Sun, Feb 21, 2016 at 12:30 AM, Gilad Denneboom < >>> gilad.denneboom@gmail.com >>> >> wrote: >>> > >>> >> Hi all, >>> >> >>> >> Hoping someone can help me with this issue... >>> >> I have a tool that adds new highlight annotations to a page. It work= s >>> very >>> >> well, except for when the page is rotated. I know I need to apply a >>> >> transformation to my rect and/or quads to get them to match the >>> rotated >>> >> user space, but I just can't get it to work. >>> >> Is there a utility in PDFBox (I'm using 1.8.11 at the moment) that c= an >>> >> help me perform this transformation so I can place my annotations at >>> the >>> >> right location on these pages? >>> >> >>> >> Thanks a lot in advance for any helpful tips... >>> >> >>> >> Gilad >>> >> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org >>> For additional commands, e-mail: users-help@pdfbox.apache.org >>> >>> >> > --001a114d6f268f9a3d052d719038--