Subformats finished and tested
This commit is contained in:
parent
3162f53a2d
commit
05b4201585
|
@ -3498,9 +3498,11 @@ let go () =
|
||||||
else (if ida ^ idb = "" then Printf.printf "ID: None" else Printf.printf "ID: %s %s\n" ida idb);
|
else (if ida ^ idb = "" then Printf.printf "ID: None" else Printf.printf "ID: %s %s\n" ida idb);
|
||||||
let pdf = decrypt_if_necessary input (Some Info) pdf in
|
let pdf = decrypt_if_necessary input (Some Info) pdf in
|
||||||
if args.format_json then
|
if args.format_json then
|
||||||
|
begin
|
||||||
Cpdfmetadata.output_info ~json Cpdfmetadata.UTF8 pdf;
|
Cpdfmetadata.output_info ~json Cpdfmetadata.UTF8 pdf;
|
||||||
Cpdfmetadata.output_xmp_info ~json Cpdfmetadata.UTF8 pdf;
|
Cpdfmetadata.output_xmp_info ~json Cpdfmetadata.UTF8 pdf;
|
||||||
flprint (Cpdfyojson.Safe.pretty_to_string (`Assoc (rev !json)))
|
flprint (Cpdfyojson.Safe.pretty_to_string (`Assoc (rev !json)))
|
||||||
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Cpdfmetadata.output_info args.encoding pdf;
|
Cpdfmetadata.output_info args.encoding pdf;
|
||||||
|
|
|
@ -129,7 +129,6 @@ let print_metadata pdf =
|
||||||
Printf.printf "%c" (char_of_int (bget data x))
|
Printf.printf "%c" (char_of_int (bget data x))
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
let get_info raw pdf =
|
let get_info raw pdf =
|
||||||
let infodict =
|
let infodict =
|
||||||
match Pdf.lookup_direct pdf "/Info" pdf.Pdf.trailerdict with
|
match Pdf.lookup_direct pdf "/Info" pdf.Pdf.trailerdict with
|
||||||
|
|
Loading…
Reference in New Issue