open_in -> open_in_bin for -typeset, others
This commit is contained in:
parent
a83b004cee
commit
4f3b80c5df
|
@ -2608,7 +2608,7 @@ let rec get_single_pdf ?(decrypt=true) ?(fail=false) op read_lazy =
|
||||||
let warn_gs () =
|
let warn_gs () =
|
||||||
begin match args.inputs with
|
begin match args.inputs with
|
||||||
(InFile inname, _, _, _, _, _)::_ ->
|
(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;
|
Printf.eprintf "File %s does not exist\n%!" inname;
|
||||||
exit 2
|
exit 2
|
||||||
end
|
end
|
||||||
|
@ -2691,7 +2691,7 @@ let rec get_pdf_from_input_kind ?(read_lazy=false) ?(decrypt=true) ?(fail=false)
|
||||||
let warn_gs () =
|
let warn_gs () =
|
||||||
begin match input with
|
begin match input with
|
||||||
(InFile inname, _, _, _, _, _) ->
|
(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;
|
Printf.eprintf "File %s does not exist\n%!" inname;
|
||||||
exit 2
|
exit 2
|
||||||
end
|
end
|
||||||
|
@ -4014,7 +4014,7 @@ let go () =
|
||||||
in
|
in
|
||||||
write_pdf false pdf
|
write_pdf false pdf
|
||||||
| Some (Typeset filename) ->
|
| 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 cpdffont = embed_font () in
|
||||||
let pdf = Cpdftexttopdf.typeset ~font:cpdffont ~papersize:args.createpdf_pagesize ~fontsize:args.fontsize text in
|
let pdf = Cpdftexttopdf.typeset ~font:cpdffont ~papersize:args.createpdf_pagesize ~fontsize:args.fontsize text in
|
||||||
write_pdf false pdf
|
write_pdf false pdf
|
||||||
|
|
Loading…
Reference in New Issue