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 842D418956 for ; Wed, 24 Feb 2016 14:28:34 +0000 (UTC) Received: (qmail 83852 invoked by uid 500); 24 Feb 2016 14:28:00 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 83823 invoked by uid 500); 24 Feb 2016 14:28:00 -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 83811 invoked by uid 99); 24 Feb 2016 14:27:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Feb 2016 14:27:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3BFA3C14D2 for ; Wed, 24 Feb 2016 14:27:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.28 X-Spam-Level: * X-Spam-Status: No, score=1.28 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=khk-net.20150623.gappssmtp.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id YMZeSBB1B0uF for ; Wed, 24 Feb 2016 14:27:57 +0000 (UTC) Received: from mail-vk0-f50.google.com (mail-vk0-f50.google.com [209.85.213.50]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 226765FBA5 for ; Wed, 24 Feb 2016 14:27:56 +0000 (UTC) Received: by mail-vk0-f50.google.com with SMTP id k196so18207145vka.0 for ; Wed, 24 Feb 2016 06:27:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=khk-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=XFtX/oZeHRr8WbpHM/FxpoUL6Dtf3h5WRurIQZNVUt8=; b=nXuQ08wopwrMpHQcZ85iP6fv5fmMVupKuI92fGwXzg+cw8a99onwOJ8+xZdLvo3g5S p/OPgRYi0K/TlthDuGUz3wT2DE7Cf0YxWDb4e10NVxPU9Ko3eXFilI7ctp1mOOsH9F4m AW/5jwLFj9Jhg2DHss7ZBBofPrD0inXxTVTypB3QIAudRjiMkasbTF99ei+n4GL9ZgC6 C205r98LQ8F8EU8rpkqfgmi9SxiXx5jiK7PrKbP2oGvWg5GI3DATpvGsp85KMT9CtINV letoCxNAfBVtTzcM/g0O+tzotUSTjRd0H2HP3jFoXl1N7NmYva5ID+XTmpuct0JnV+4v rSJg== 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:content-type; bh=XFtX/oZeHRr8WbpHM/FxpoUL6Dtf3h5WRurIQZNVUt8=; b=ih9gfNmG2NyV6CWbJh50sJ/qdOATP124JxVZzX+asDXh7sgMa+nqCulJaicFm0kRb5 E0gKhfxivqbQ6UKSNI6C35/e0qGKcor1LZbwGf7Z50SAF73G2NvA3CZMxRArnPAY6nNF TDoVHB0rR3eLTnDZj+u/FjQr45a/M9lK4rCVUScUtNu+G2JQlsBHFPATMO9ng91v+U1q e7I4tTkGVgw2LYp9GTnYedu3PUPStcJpe+9QSX90csOJwj0cM9bYRzryEryBQwdy4Nqt Z/F6cDVoFxVD402X/VxDgLJDFcyUtPdAZAyIko/B6Bd19U7RDuyVzNfN8Xc/4X8+6hgM sX+Q== X-Gm-Message-State: AG10YOTweXl1EvczYtAc/cIOWAdwP3ZD/LPws8loZgO1ZcAlIuPC67awZAglvRCrklhoYPTq2RzdxkBiMEo7hg== X-Received: by 10.31.160.150 with SMTP id j144mr35469289vke.59.1456324075035; Wed, 24 Feb 2016 06:27:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.32.228 with HTTP; Wed, 24 Feb 2016 06:27:35 -0800 (PST) In-Reply-To: References: <69E0D904-3442-4C2D-A14D-EC5B5E0E85CD@fileaffairs.de> From: Karl Heinz Kremer Date: Wed, 24 Feb 2016 09:27:35 -0500 Message-ID: Subject: Re: Rotating a new annotation to match the page's rotation To: users@pdfbox.apache.org Content-Type: multipart/alternative; boundary=001a1142e9622bb346052c84dfae --001a1142e9622bb346052c84dfae Content-Type: text/plain; charset=UTF-8 I came up with a solution for such a problem in a previous job (which means I don't have access to the code anymore). The process I used was to create test documents in all rotations, with annotations in all four rotations in Adobe Acrobat. I then analyzed the files and came up with a transformation for every case. I then just used a switch statement for the four different page rotations to place my annotation in the correct spot. Hope that helps, Karl Heinz On Wed, Feb 24, 2016 at 8:30 AM, Gilad Denneboom 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 the 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 makes 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 works > > 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 can > > >> 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 > > > > > --001a1142e9622bb346052c84dfae--