diff --git a/lib/moi/util/pdf.elv b/lib/moi/util/pdf.elv index 84868d0..16a0644 100644 --- a/lib/moi/util/pdf.elv +++ b/lib/moi/util/pdf.elv @@ -49,6 +49,11 @@ fn form {|in| put $json[acroform] } +fn encryption {|in| + var json = (json $in) + put $json[encrypt] +} + fn objects {|in| var json = (json $in) put $json[objects] @@ -86,7 +91,7 @@ fn filter {|&extend=$false in cond| } fn trailer {|in| - object &extend=$true $in 'trailer' + object $in 'trailer' } fn pages {|in| @@ -94,6 +99,10 @@ fn pages {|in| put $json[pages] } +fn page {|in nb| + put (pages $in)[(- $nb 1)] +} + fn nb-pages {|in| qpdf --show-npages $in }