Created
August 23, 2012 15:39
-
-
Save JasPanesar/3437827 to your computer and use it in GitHub Desktop.
How to retrieve total page count from a PDF in CFML or CFSCRIPT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using CFSCRIPT | |
pdfService = new pdf(); | |
pdfService.setSource( expandpath( './#mypdf#.pdf' ) ); | |
PDFInfo = pdfService.getPdfInfo( name = "pdfinfo" ); | |
pageCount = PDFInfo.TotalPages; | |
From: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_p-q_02.html | |
CFML: | |
<cfpdf action = "getInfo" source = "#mypdf#.pdf" name = "PDFInfo" > | |
<cfset pageCount = "#PDFInfo.TotalPages#" > | |
From: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSe9cbe5cf462523a0693d5dae123bcd28f6d-7ffd.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment