Subformats finished and tested

This commit is contained in:
John Whitington 2023-11-01 20:47:52 +00:00
parent 3162f53a2d
commit 05b4201585
2 changed files with 5 additions and 4 deletions

View File

@ -3498,9 +3498,11 @@ let go () =
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
if args.format_json then
Cpdfmetadata.output_info ~json Cpdfmetadata.UTF8 pdf;
Cpdfmetadata.output_xmp_info ~json Cpdfmetadata.UTF8 pdf;
flprint (Cpdfyojson.Safe.pretty_to_string (`Assoc (rev !json)))
begin
Cpdfmetadata.output_info ~json Cpdfmetadata.UTF8 pdf;
Cpdfmetadata.output_xmp_info ~json Cpdfmetadata.UTF8 pdf;
flprint (Cpdfyojson.Safe.pretty_to_string (`Assoc (rev !json)))
end
else
begin
Cpdfmetadata.output_info args.encoding pdf;

View File

@ -129,7 +129,6 @@ let print_metadata pdf =
Printf.printf "%c" (char_of_int (bget data x))
done
let get_info raw pdf =
let infodict =
match Pdf.lookup_direct pdf "/Info" pdf.Pdf.trailerdict with