All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lib.pdfpagecount.ps Maven / Gradle / Ivy

Go to download

# Tess4J ## Description: A Java JNA wrapper for Tesseract OCR API. Tess4J is released and distributed under the Apache License, v2.0. ## Features: The library provides optical character recognition (OCR) support for: TIFF, JPEG, GIF, PNG, and BMP image formats Multi-page TIFF images PDF document format

There is a newer version: 5.13.0
Show newest version
% pdfpagecount.ps
% read pdf file and output number of pages
% based on pdf2dsc.ps with one line taken from ps2ascii.ps
/PDFfile PDFname (r) file def

/PageCountString 255 string

def
systemdict /.setsafe known { .setsafe } if
/.show.stdout { (%stdout) (w) file } bind def
/puts { .show.stdout exch writestring } bind def
GS_PDF_ProcSet begin
pdfdict begin
PDFfile
pdfopen begin
/FirstPage where { pop } { /FirstPage 1 def } ifelse
/LastPage where { pop } { /LastPage pdfpagecount def } ifelse
(%%Pages: ) puts
LastPage FirstPage sub 1 add

PageCountString cvs puts

quit




© 2015 - 2025 Weber Informatics LLC | Privacy Policy