News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sameer Borate's Blog:
Read the version of a PDF in PHP
July 22, 2011 @ 09:54:18

Sameer Borate has a quick post to his blog today with some code that lets you read the version of a PDF document programmatically without a dependency on a PDF extension or library being installed.

The following [example] is a very short code to read the version number of a PDF document using PHP. I needed this recently during a PDF processing app developed in PHP. As Adobe uses different compression methods in various versions, it becomes necessary to be able to identify the version of the PDF under work.

The code opens the file with a fopen and parses a certain line for the major and minor version. The PDF extension for PHP can do something similar with the pdf_get_value function passing in either "major" or "minor" as the second parameter.

0 comments voice your opinion now!
tutorial read version pdf file extension fopen


blog comments powered by Disqus

Similar Posts

Gonzalo Ayuso: Handling several PDO Database connections in Symfony2 through the DIC in PHP

Gonzalo Ayuso's Blog: Howto Send/Read SMSs using a GSM modem, AT+ commands and PHP

TotalPHP.com: How to Read an RSS Feed with PHP 5

SitePoint PHP Blog: How to Use PHP Namespaces (Parts 2 &3)

Zend Developer Zone: Creating Template-Based Applications with HTML_Template_Flexy


Community Events





Don't see your event here?
Let us know!


laravel api release opinion testing refactor interview podcast framework series install unittest list developer threedevsandamaybe community language wordpress introduction code

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework