03-04-2008
how to get number of pages in a PDF file
Hello,
Can anyone please help me providing script to get the number of pages in a PDF file?
TIA
Prvn
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
This is a simple example of a shell script. I made it because it's sometimes convenient to search through a manpage and to have access to the terminal while you're reading (maybe to test code).
It also serves as a basic example for anyone learning shell scripting.
#!/bin/sh
nm="/tmp/$1.pdf"... (0 Replies)
Discussion started by: CRGreathouse
0 Replies
2. Shell Programming and Scripting
Hi,
I am trying to convert html to pdf using perl module PDF::FromHTML, am getting the error as given below.
not well-formed (invalid token) at line 2, column 17, byte 56 at C:/Perl/lib/XML/Parser.pm line 187 at C:/Perl/site/lib/PDF/FromHTML.pm line 140
The perl code is as given... (2 Replies)
Discussion started by: DILEEP410
2 Replies
3. UNIX for Advanced & Expert Users
I have some code in fortran90, example stored in scode.f90 and I want to create a pdf containing the code. I would like to have four pages of code put into each page in the pdf. I was thinking of creating a ps file using mpage and then using ps2pdf after. However, I noticed that ps2pdf shift the... (4 Replies)
Discussion started by: kristinu
4 Replies
4. Shell Programming and Scripting
I have a file like below . The good pages must have 3 conditions :
The pages that containing page total only must have 50 lines.
The pages that containing customer total only must have 53 lines.
The last page of Customer Total should be the last page.
How can I accomplish separating good... (1 Reply)
Discussion started by: ehabaziz2001
1 Replies
5. Shell Programming and Scripting
Hello,
I have a few thousand .pdf files in various folders each have a naming scheme like this:
006_-_Titled_Document_#34_-_September-25-2011-side-1.pdf
In each folder, the number system starts at 001 (as you see on the far left of the file name), and then ends at 999 (maximum .pdf files).... (4 Replies)
Discussion started by: Marcus Aurelius
4 Replies
6. UNIX for Dummies Questions & Answers
Hello,
Some googling and checking the man pages told me it should be possible to split a pdf (or ps) file into individual pages :
man gs
You might want to print each page separately. To do this, send the
output to a series of files "foo1.xyz, foo2.xyz, ..." using the "-sOut-... (3 Replies)
Discussion started by: jossojjos
3 Replies
7. Shell Programming and Scripting
In here we have a script to extract all pdf links from a single page.. any idea's in how make this read instead of a page a list of pages.. and extract all pdf links ?
#!/bin/bash
# NAME: pdflinkextractor
# AUTHOR: Glutanimate (http://askubuntu.com/users/81372/), 2013
#... (1 Reply)
Discussion started by: danielldf
1 Replies
8. Shell Programming and Scripting
Does anybody have idea of Converting secured pdf files to pdf using acroread ?
---------- Post updated at 04:49 PM ---------- Previous update was at 04:44 PM ----------
This file is not password protected. (4 Replies)
Discussion started by: Soham
4 Replies
9. Shell Programming and Scripting
So I've worked how to add page numbers based on regex. It's using the footer text.
How do we get the total amount added so we have page number with the total number of pages?
Desired output: Page No:1 of 5
Thanks in advance. (15 Replies)
Discussion started by: tugar
15 Replies
LEARN ABOUT ULTRIX
pdfinfo
pdfinfo(1) General Commands Manual pdfinfo(1)
NAME
pdfinfo - Portable Document Format (PDF) document information extractor (version 3.00)
SYNOPSIS
pdfinfo [options] [PDF-file]
DESCRIPTION
Pdfinfo prints the contents of the 'Info' dictionary (plus some other useful information) from a Portable Document Format (PDF) file.
The 'Info' dictionary contains the following values:
title
subject
keywords
author
creator
producer
creation date
modification date
In addition, the following information is printed:
tagged (yes/no)
page count
encrypted flag (yes/no)
print and copy permissions (if encrypted)
page size
file size
linearized (yes/no)
PDF version
metadata (only if requested)
OPTIONS
-f number
Specifies the first page to examine. If multiple pages are requested using the "-f" and "-l" options, the size of each requested
page (and, optionally, the bounding boxes for each requested page) are printed. Otherwise, only page one is examined.
-l number
Specifies the last page to examine.
-box Prints the page box bounding boxes: MediaBox, CropBox, BleedBox, TrimBox, and ArtBox.
-meta Prints document-level metadata. (This is the "Metadata" stream from the PDF file's Catalog object.)
-enc encoding-name
Sets the encoding to use for text output. This defaults to "UTF-8".
-listenc
Lits the available encodings
-opw password
Specify the owner password for the PDF file. Providing this will bypass all security restrictions.
-upw password
Specify the user password for the PDF file.
-v Print copyright and version information.
-h Print usage information. (-help and --help are equivalent.)
EXIT CODES
The Xpdf tools use the following exit codes:
0 No error.
1 Error opening a PDF file.
2 Error opening an output file.
3 Error related to PDF permissions.
99 Other error.
AUTHOR
The pdfinfo software and documentation are copyright 1996-2004 Glyph & Cog, LLC.
SEE ALSO
pdffonts(1), pdfimages(1), pdftocairo(1), pdftohtml(1), pdftoppm(1), pdftops(1), pdftotext(1)
22 January 2004 pdfinfo(1)