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 02AB0119DB for ; Fri, 6 Jun 2014 13:57:41 +0000 (UTC) Received: (qmail 76383 invoked by uid 500); 6 Jun 2014 13:57:40 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 76361 invoked by uid 500); 6 Jun 2014 13:57:40 -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 76350 invoked by uid 99); 6 Jun 2014 13:57:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2014 13:57:40 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of james.mk.green@gmail.com designates 209.85.192.49 as permitted sender) Received: from [209.85.192.49] (HELO mail-qg0-f49.google.com) (209.85.192.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2014 13:57:36 +0000 Received: by mail-qg0-f49.google.com with SMTP id a108so4388737qge.8 for ; Fri, 06 Jun 2014 06:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=2nFodagy13JVN+Do6vyRIfqT0xLl+vrZAAKASx7eLXs=; b=SZbj1tZf3H8bqIkJiS8KPPHrt3e9I0aRd3OmPGSFiQ1yXZ0q3NrW/I/xWi0cf4KXY3 C/rK75fLE6QpM4IzpJplZbR5JTBwfG5nU+XtHeBkkpe0H16NGuXM1L//k/Je15jHgpqy FFlnX/XgztZQH3Tr6cbg76Av0eaOfOpjnW4OpN3qHohWcFdtmSxO0bEvG/E9zU7gJwbQ QfaWQ+BhdO1Krd+mbhP8desVRlOB40RwiWoyLOd1GYsM3nTzsnReIMbUDTavLkFQgNWt DDu+BXxBFhtLUO+W8FZFt6lHgsJTHoDyzVrbq3Rsz/53qKbHRI//b8aIPcADovQ9zB3W Wvmw== MIME-Version: 1.0 X-Received: by 10.140.102.166 with SMTP id w35mr8276391qge.97.1402063032641; Fri, 06 Jun 2014 06:57:12 -0700 (PDT) Received: by 10.170.146.69 with HTTP; Fri, 6 Jun 2014 06:57:12 -0700 (PDT) In-Reply-To: References: Date: Fri, 6 Jun 2014 14:57:12 +0100 Message-ID: Subject: Re: Extracting text by region From: James Green To: users Content-Type: multipart/alternative; boundary=001a11c15f3a036f7704fb2b3d07 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c15f3a036f7704fb2b3d07 Content-Type: text/plain; charset=UTF-8 Thank you - works now. On 6 June 2014 12:23, Gilad Denneboom wrote: > Unless otherwise mentioned, all measurements in a PDF are done using > PostScript Points, which are defined as 72 points to one inch. > > > On Fri, Jun 6, 2014 at 12:59 PM, James Green > wrote: > > > I am now confused, and I thought this would be a ten minute job... > > > > I have an A4 PDF document. I know the area of the page an address would > be > > found. So I created a PDFTextStripperByArea and set a region > > correspondingly, named "Address". > > > > This yielded nothing. Expanding the region randomly showed the address. > > Puzzled, I asked for the media box size and it's a lot larger than the > size > > of A4. > > > > So if I'm not expected to provide a region in mm, what does it accept? > > > > Incidentally, the Javadoc > > > > > http://pdfbox.apache.org/docs/1.8.3/javadocs/org/apache/pdfbox/util/PDFTextStripperByArea.html#addRegion(java.lang.String > > , > > java.awt.geom.Rectangle2D) leads me to wonder what exactly "grouping" > > actually does. I imagined the documentation would read: > > > > "Adds a rectangular area of the page for reading text within." > > > > Thanks, > > > > James > > > --001a11c15f3a036f7704fb2b3d07--