Hardened against XML parsing failures in metadata reading
This commit is contained in:
parent
19b9d56c5a
commit
898776ee73
3
cpdf.ml
3
cpdf.ml
|
@ -2932,6 +2932,7 @@ let output_xmp_info encoding pdf =
|
|||
match get_metadata pdf with
|
||||
None -> ()
|
||||
| Some metadata ->
|
||||
try
|
||||
let dtd, tree = xmltree_of_bytes metadata in
|
||||
print_out tree "XMP pdf:Keywords" adobe "Keywords";
|
||||
print_out tree "XMP pdf:PDFVersion" adobe "PDFVersion";
|
||||
|
@ -2944,6 +2945,8 @@ let output_xmp_info encoding pdf =
|
|||
print_out tree "XMP dc:title" dc "title";
|
||||
print_out tree "XMP dc:creator" dc "creator";
|
||||
print_out tree "XMP dc:subject" dc "subject"
|
||||
with
|
||||
_ -> ()
|
||||
|
||||
(* \section{Blacken text} *)
|
||||
|
||||
|
|
Loading…
Reference in New Issue