mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-04-14 02:12:27 +02:00
Code freeze for 2.1 builds
This commit is contained in:
parent
491262c9e7
commit
1c39f1bc32
8
cpdf.ml
8
cpdf.ml
@ -2,6 +2,8 @@
|
|||||||
open Pdfutil
|
open Pdfutil
|
||||||
open Pdfio
|
open Pdfio
|
||||||
|
|
||||||
|
let debug = ref false
|
||||||
|
|
||||||
(* Prefer a) the one given with -cpdflin b) a local cpdflin, c) otherwise assume
|
(* Prefer a) the one given with -cpdflin b) a local cpdflin, c) otherwise assume
|
||||||
installed at a system place *)
|
installed at a system place *)
|
||||||
let find_cpdflin provided =
|
let find_cpdflin provided =
|
||||||
@ -25,14 +27,14 @@ let call_cpdflin cpdflin temp output best_password =
|
|||||||
match Sys.os_type with
|
match Sys.os_type with
|
||||||
"Win32" ->
|
"Win32" ->
|
||||||
(* On windows, don't use LD_LIBRARY_PATH - it will happen automatically *)
|
(* On windows, don't use LD_LIBRARY_PATH - it will happen automatically *)
|
||||||
print_endline command;
|
if !debug then prerr_endline command;
|
||||||
Sys.command command
|
Sys.command command
|
||||||
| _ ->
|
| _ ->
|
||||||
(* On other platforms, if -cpdflin was provided, or cpdflin was in the
|
(* On other platforms, if -cpdflin was provided, or cpdflin was in the
|
||||||
current folder, set up LD_LIBRARY_PATH: *)
|
current folder, set up LD_LIBRARY_PATH: *)
|
||||||
match cpdflin with
|
match cpdflin with
|
||||||
"cpdflin" ->
|
"cpdflin" ->
|
||||||
print_endline command;
|
if !debug then prerr_endline command;
|
||||||
Sys.command command
|
Sys.command command
|
||||||
| _ ->
|
| _ ->
|
||||||
let command =
|
let command =
|
||||||
@ -40,7 +42,7 @@ let call_cpdflin cpdflin temp output best_password =
|
|||||||
"LD_LIBRARY_PATH=" ^ Filename.dirname cpdflin ^ " " ^
|
"LD_LIBRARY_PATH=" ^ Filename.dirname cpdflin ^ " " ^
|
||||||
command
|
command
|
||||||
in
|
in
|
||||||
print_endline command;
|
if !debug then prerr_endline command;
|
||||||
Sys.command command
|
Sys.command command
|
||||||
|
|
||||||
(* Recompress anything which isn't compressed, unless it's metadata. *)
|
(* Recompress anything which isn't compressed, unless it's metadata. *)
|
||||||
|
2
cpdf.mli
2
cpdf.mli
@ -476,3 +476,5 @@ val find_cpdflin : string option -> string
|
|||||||
|
|
||||||
val call_cpdflin : string -> string -> string -> string -> int
|
val call_cpdflin : string -> string -> string -> string -> int
|
||||||
|
|
||||||
|
val debug : bool ref
|
||||||
|
|
||||||
|
@ -1099,6 +1099,7 @@ let setdebug () =
|
|||||||
set Pdfread.read_debug;
|
set Pdfread.read_debug;
|
||||||
set Pdfwrite.write_debug;
|
set Pdfwrite.write_debug;
|
||||||
set Pdfcrypt.crypt_debug;
|
set Pdfcrypt.crypt_debug;
|
||||||
|
set Cpdf.debug;
|
||||||
args.debug <- true
|
args.debug <- true
|
||||||
|
|
||||||
let setdebugcrypt () =
|
let setdebugcrypt () =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user