note 50678 added to ref.pdf

From: Date: Mon, 07 Mar 2005 03:57:15 +0000
Subject: note 50678 added to ref.pdf
Groups: php.notes 
Request: Send a blank email to php-notes+get-86021@lists.php.net to get a copy of this message
How to get how many pages in a PDF? I read PDF spec. V1.6 and find this: PDF set a "Page Tree Node" to define the ordering of pages in the document. The tree structure allows PDF applications, using little memory to quickly open a document containing thousands of pages. If a PDF have 63 pages, the page tree node will like this... 2 0 obj << /Type /Pages /Kidsn [ 4 0 R 10 0 R ] /Count 63 <---- YES, got it >> endobj [P.S] a PDF may not only a pages tree node, The right answer is in "root page tree node", if /Count XX with /Parent XXX node, it not "root page tree node" SO, You must find the node with /Count XX and Without /Parent terms, and you'll get total pages of PDF %PDF-1.0 ~ %PDF-1.5 all works Alex form Taipei,Taiwan ---- Manual Page -- http://www.php.net/manual/en/ref.pdf.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50678 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50678&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50678&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50678&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50678&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50678&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50678&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#86021) next »