From 4f3b80c5df55d0b5d1b65a7986b0777d0a484411 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Wed, 2 Nov 2022 21:13:27 +0000 Subject: [PATCH] open_in -> open_in_bin for -typeset, others --- cpdfcommand.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpdfcommand.ml b/cpdfcommand.ml index dcae226..09f03ad 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -2608,7 +2608,7 @@ let rec get_single_pdf ?(decrypt=true) ?(fail=false) op read_lazy = let warn_gs () = begin match args.inputs with (InFile inname, _, _, _, _, _)::_ -> - begin try ignore (close_in (open_in inname)) with _ -> + begin try ignore (close_in (open_in_bin inname)) with _ -> Printf.eprintf "File %s does not exist\n%!" inname; exit 2 end @@ -2691,7 +2691,7 @@ let rec get_pdf_from_input_kind ?(read_lazy=false) ?(decrypt=true) ?(fail=false) let warn_gs () = begin match input with (InFile inname, _, _, _, _, _) -> - begin try ignore (close_in (open_in inname)) with _ -> + begin try ignore (close_in (open_in_bin inname)) with _ -> Printf.eprintf "File %s does not exist\n%!" inname; exit 2 end @@ -4014,7 +4014,7 @@ let go () = in write_pdf false pdf | Some (Typeset filename) -> - let text = Pdfio.bytes_of_input_channel (open_in filename) in + let text = Pdfio.bytes_of_input_channel (open_in_bin filename) in let cpdffont = embed_font () in let pdf = Cpdftexttopdf.typeset ~font:cpdffont ~papersize:args.createpdf_pagesize ~fontsize:args.fontsize text in write_pdf false pdf