mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-06-05 22:09:39 +02:00
Booleans for trapped and untrapped
This commit is contained in:
9
cpdf.ml
9
cpdf.ml
@@ -3381,8 +3381,13 @@ let rec set_xml_field only_when_present kind fieldname value = function
|
||||
|
||||
let set_pdf_info_xml only_when_present kind fieldname value xmldata pdf =
|
||||
let dtd, tree = xmltree_of_bytes xmldata in
|
||||
(* FIXME NEED BOOLEANS HERE FOR TRAPPED/UNTRAPPED *)
|
||||
let str = match value with Pdf.String s -> s | _ -> failwith "set_pdf_info_xml: not a string" in
|
||||
let str =
|
||||
match value with
|
||||
Pdf.String s -> s
|
||||
| Pdf.Boolean true -> "True"
|
||||
| Pdf.Boolean false -> "False"
|
||||
| _ -> failwith "set_pdf_info_xml: not a string"
|
||||
in
|
||||
let newtree = set_xml_field only_when_present kind fieldname str tree in
|
||||
bytes_of_xmltree (dtd, newtree)
|
||||
|
||||
|
Reference in New Issue
Block a user