Module pdf : récupération des infos de chiffrement + info sur une page donnée + ne pas parcourir le trailer en profondeur (risque de boucle)

This commit is contained in:
Benjamin VAUDOUR 2021-12-22 12:31:39 +00:00
parent 3e66e82f8e
commit 4c91add277
1 changed files with 10 additions and 1 deletions

View File

@ -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
}