util::pdfinfo (public)

 util::pdfinfo file

Defined in packages/acs-tcl/tcl/utilities-procs.tcl

Calls the pdfinfo command line utility on a given pdf file. The command pdfinfo must be installed on the server for this to work. On linux this is usually part of the poppler-utils (https://poppler.freedesktop.org/).

Parameters:
file (required)
absolute path to the pdf file
Returns:
a dict containing all the pdfinfo returned fields as keys and their respective values

Partial Call Graph (max 5 caller/called nodes):
%3 util::which util::which (public) util::pdfinfo util::pdfinfo util::pdfinfo->util::which

Testcases:
No testcase defined.
Source code:
    set pdfinfo [util::which pdfinfo]

    if {$pdfinfo eq ""} {
        error "the command 'pdfinfo' is not found on the system"
    }

    set retval [dict create]
    foreach line [split [exec $pdfinfo $file] \n] {
        lassign [split $line ":"] name value
        set name  [string trim $name]
        set value [string trim $value]
        dict set retval $name $value
    }

    return $retval
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/utilities-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: