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 4AFA4175C1 for ; Wed, 22 Apr 2015 08:16:50 +0000 (UTC) Received: (qmail 1044 invoked by uid 500); 22 Apr 2015 08:16:45 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 1019 invoked by uid 500); 22 Apr 2015 08:16:45 -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 728 invoked by uid 99); 22 Apr 2015 08:16:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Apr 2015 08:16:45 +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 (athena.apache.org: message received from 54.191.145.13 which is an MX secondary for users@pdfbox.apache.org) Received: from [54.191.145.13] (HELO mx1-us-west.apache.org) (54.191.145.13) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Apr 2015 08:16:37 +0000 Received: from emea01-db3-obe.outbound.protection.outlook.com (mail-db3on0111.outbound.protection.outlook.com [157.55.234.111]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 4E68B25F93 for ; Wed, 22 Apr 2015 08:15:42 +0000 (UTC) Received: from AM2PR05MB0850.eurprd05.prod.outlook.com (25.161.131.13) by AM2PR05MB0852.eurprd05.prod.outlook.com (25.161.131.15) with Microsoft SMTP Server (TLS) id 15.1.136.25; Wed, 22 Apr 2015 08:15:34 +0000 Received: from AM2PR05MB0850.eurprd05.prod.outlook.com ([25.161.131.13]) by AM2PR05MB0850.eurprd05.prod.outlook.com ([25.161.131.13]) with mapi id 15.01.0148.008; Wed, 22 Apr 2015 08:15:33 +0000 From: Johanneke Lamberink To: "users@pdfbox.apache.org" Subject: Getting the pagenumber of a PDPage Thread-Topic: Getting the pagenumber of a PDPage Thread-Index: AQHQfNSBHzNgpncPXkaJ5AENiQGtMw== Date: Wed, 22 Apr 2015 08:15:33 +0000 Message-ID: Accept-Language: nl-NL, en-US Content-Language: nl-NL X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: pdfbox.apache.org; dkim=none (message not signed) header.d=none; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [92.65.236.114] x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM2PR05MB0852; x-microsoft-antispam-prvs: x-forefront-antispam-report: BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(71364002)(36756003)(106116001)(102836002)(46102003)(229853001)(2501003)(110136001)(2351001)(107886001)(54356999)(86362001)(2656002)(50986999)(87936001)(16236675004)(66066001)(122556002)(77156002)(62966003)(40100003)(450100001)(92566002)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:AM2PR05MB0852;H:AM2PR05MB0850.eurprd05.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(5002010);SRVR:AM2PR05MB0852;BCL:0;PCL:0;RULEID:;SRVR:AM2PR05MB0852; x-forefront-prvs: 0554B1F54F Content-Type: multipart/alternative; boundary="_000_D15D254329F1johannekelamberinkoniorcom_" MIME-Version: 1.0 X-OriginatorOrg: onior.com X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Apr 2015 08:15:33.4938 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e3137b55-4516-4b12-be82-29450bde242e X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR05MB0852 X-Virus-Checked: Checked by ClamAV on apache.org --_000_D15D254329F1johannekelamberinkoniorcom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I'm trying to get the pagenumber of a given PDPage. What I have is: document.getPages().indexOf(page) No matter the page I input, I always get the same result, which is equal to= the total number of pages document.getPages().getCount() =3D=3D document.getPages().indexOf(page) // = for every page I input. Is this a bug, or am I using the framework incorrectly? Also, I think it would be great if PDPage had a variable "page" so I wouldn= 't have to iterate through all the pages to get the index. Kind regards, Johanneke Lamberink --_000_D15D254329F1johannekelamberinkoniorcom_--