This commit is contained in:
John Whitington 2019-09-26 13:30:22 +01:00
parent 9bc5f38ec6
commit 380296a4fa
2 changed files with 10 additions and 10 deletions

View File

@ -2,8 +2,8 @@
let demo = false
let noncomp = false
let major_version = 2
let minor_version = 3
let version_date = "(build of 13th September 2019)"
let minor_version = 4
let version_date = "(devel build of 26th September 2019)"
open Pdfutil
open Pdfio
@ -735,12 +735,12 @@ let output_page_count pdf =
Printf.printf "%i\n" (Pdfpage.endpage pdf)
let detect_duplicate_op op =
if args.op <> None then
begin
match args.op with
None | Some Shift -> ()
| _ ->
Printf.eprintf "Operation %s already specified, so cannot specify operation %s.\nUse AND from Chapter 1 of the manual to chain commands together.\n"
(string_of_op (unopt args.op)) (string_of_op op);
exit 1
end
let setop op () =
detect_duplicate_op op;

View File

@ -69,11 +69,11 @@ let make_num pdf page unt num =
| Pdfgenlex.LexName
(( "PW" | "PH" | "CW" | "CH" | "PMINX" | "PMINY" | "PMAXX" | "PMAXY"
| "CMINX" | "CMINY" | "CMAXX" | "CMAXY") as page_characteristic) ->
let r =
(*let r =*)
find_page_characteristic pdf page page_characteristic
in
(*in
Printf.printf "characteristic %s is %f\n" page_characteristic r;
r
r*)
| _ -> failwith "make_num"
in
match unt with
@ -178,7 +178,7 @@ and parse_units pdf page numbers = function
let r =
find_page_characteristic pdf page page_characteristic
in
Printf.printf "characteristic %s is %f\n" page_characteristic r;
(* Printf.printf "characteristic %s is %f\n" page_characteristic r;*)
parse_units pdf page (r::numbers) more
| Pdfgenlex.LexName ("add" | "sub" | "mul" | "div") as op::
((Pdfgenlex.LexInt _ | Pdfgenlex.LexReal _ | Pdfgenlex.LexName
@ -233,7 +233,7 @@ let parse_coordinate pdf s =
try
match parse_units_string pdf emptypage s with
| [dx; dy] ->
Printf.printf "result = %f, %f\n" dx dy;
(*Printf.printf "result = %f, %f\n" dx dy;*)
dx, dy
| _ -> error ("Bad coordinate specification " ^ s)
with