473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

count pages in a pdf

is it possible to parse a pdf file in python? for starters, i would
like to count the number of pages in a pdf file. i see there is a
project called ReportLab, but it seems to be a pdf generator... i
can't tell if i would be able to parse a pdf file programmically.

thanks for any recommendations.

bryan
Nov 27 '07 #1
3 4050
be****@gmail.com wrote:
is it possible to parse a pdf file in python? for starters, i would
like to count the number of pages in a pdf file. i see there is a
project called ReportLab, but it seems to be a pdf generator... i
can't tell if i would be able to parse a pdf file programmically.
Well the simple expedient of putting "python count pages pdf" into
Google turned up the following link:

http://aspn.activestate.com/ASPN/Coo.../Recipe/496837

and no few others. Might be worth a look?

TJG
Nov 27 '07 #2
Tim Golden wrote:
be****@gmail.com wrote:
>is it possible to parse a pdf file in python? for starters, i would
like to count the number of pages in a pdf file. i see there is a
project called ReportLab, but it seems to be a pdf generator... i
can't tell if i would be able to parse a pdf file programmically.
http://groups.google.de/group/comp.l...304970b4ff40ce
and following.
Well the simple expedient of putting "python count pages pdf" into
Google turned up the following link:

http://aspn.activestate.com/ASPN/Coo.../Recipe/496837
mmmmh. There is a non-vanishing possibility that this pattern-
matching can give you false positives -not reliable.

Wishing a happy day,
LOBI
Nov 27 '07 #3
On 2007-11-27, be****@gmail.com <be****@gmail.comwrote:
is it possible to parse a pdf file in python? for starters, i would
like to count the number of pages in a pdf file. i see there is a
project called ReportLab, but it seems to be a pdf generator... i
can't tell if i would be able to parse a pdf file programmically.
http://pybrary.net/pyPdf/
Nov 27 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jose Benito Gonzalez Lopez | last post by:
Hi there, Does anyone know how I could do in order to get/count the number of pages of a PDF file? (from python of course ;) ) Thanks beforehand. Cheers, Jose
2
by: TGOS | last post by:
Here's a little question to MySQL Gurus. Two tables. One called 'document' one called 'page'. Needles to say, a document consist out of multiple pages (1:n). The primary (P) and foreign (F) keys...
1
by: VBSponge | last post by:
Hi all. In A2K i have a report with a control bound to to calculate the page count for the report. I need to retrieve this page count from the report, and build it into a TOC containing this an...
3
by: Tim | last post by:
Hi, I am creating my own method for printing. I am using PrintDocument and cycling through the data and creating new pages as neccessary. My question is, how can I know that total number of...
6
by: Bill | last post by:
Hi I am trying to get my listbox items to print if they stream past the one page mark. my code is working for one page of information (if the e.hasmorepages) is not there. But I am having...
2
by: bling via DotNetMonster.com | last post by:
greetings fellow programmers!! im kinda new in vb.net and i need your professional help! im using DSOframer to open .doc files but i disabled the menubar and toolbar because i just want to show...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4. Given a path to a PDF file, how would I determine the number of pages in that file? Thanks, - Dave
0
by: phpmel | last post by:
Casn some one help me do this. I have a label above a gridview that suppose to show "Records 1 to 10 of 1000" well not exxactly that but the actual record count of the gridview etc. this label...
11
by: simon2x1 | last post by:
i have 3 pages,home.php, next.php page and other.php.in the home.php page i selected name from the database and i gave it a limit and also an if statement to echo next.for the next.php page and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.