pdfInfo

Returns metadata about a PDF document as a struct: { pages, source, pagesizes }. pages is the page count, source is the file path (empty when the document was read from a Binary), and pagesizes is an array of { width, height } structs in PostScript points (1/72 inch).

pdfInfo(pdfObj) → returns struct

This function requires RustCFML.  Not supported on Lucee, Adobe ColdFusion, etc.

Argument Reference

pdfObj any
Required

A PDF object from pdfRead() or pdf().

Examples
Sample code invoking the pdfInfo function

Read a PDF and dump its info struct.

doc  = PdfRead( expandPath( "/invoice.pdf" ) );
info = PdfInfo( doc );
writeDump( info );

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub