473,381 Members | 1,493 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,381 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 4049
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.