Finished SplitMax implementation
This commit is contained in:
parent
a3745be835
commit
3ea4086a0b
|
@ -3185,11 +3185,12 @@ let rec split_max_search pdf s b p q =
|
||||||
else split_max_search pdf s b p half
|
else split_max_search pdf s b p half
|
||||||
|
|
||||||
let rec split_max enc original_filename ~squeeze output_spec s pdf =
|
let rec split_max enc original_filename ~squeeze output_spec s pdf =
|
||||||
|
Printf.printf "***split_max\n";
|
||||||
let outs = ref [] in
|
let outs = ref [] in
|
||||||
let p = ref 1 in
|
let p = ref 1 in
|
||||||
let endpage = Pdfpage.endpage pdf in
|
let endpage = Pdfpage.endpage pdf in
|
||||||
let q = ref endpage in
|
let q = ref endpage in
|
||||||
while !p < !q do
|
while !p < !q || !p = endpage do
|
||||||
(*Printf.printf "Calling split_max_search %i %i %i\n%!" !p !p !q;*)
|
(*Printf.printf "Calling split_max_search %i %i %i\n%!" !p !p !q;*)
|
||||||
let newq = split_max_search pdf s !p !p !q in
|
let newq = split_max_search pdf s !p !p !q in
|
||||||
if newq = -1 then (Printf.eprintf "Failed to make small enough split at page %i\n" !p; exit 2) else
|
if newq = -1 then (Printf.eprintf "Failed to make small enough split at page %i\n" !p; exit 2) else
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
%Document -split-max
|
||||||
\documentclass{book}
|
\documentclass{book}
|
||||||
% Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf,
|
% Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf,
|
||||||
% dotnetcpdflibmanual.pdf, jcpdflibmanual.pdf jscpdflibmanual.pdf etc.
|
% dotnetcpdflibmanual.pdf, jcpdflibmanual.pdf jscpdflibmanual.pdf etc.
|
||||||
|
|
Loading…
Reference in New Issue