More work on -change-font-size

This commit is contained in:
John Whitington 2016-11-09 19:12:05 +00:00
parent 6dc94e0c3c
commit 70413d6727
1 changed files with 16 additions and 3 deletions

View File

@ -3192,8 +3192,21 @@ let remove_clipping pdf range =
in in
Cpdf.process_pages remove_clipping_page pdf range Cpdf.process_pages remove_clipping_page pdf range
let change_font_size pdf range dx dy target_size = let change_font_size_ops dx dy source_size target_size pdf resources content =
pdf content
let change_font_size pdf range dx dy source_size target_size =
let change_font_size_page _ page =
let content' =
change_font_size_ops
dx dy source_size target_size pdf
page.Pdfpage.resources page.Pdfpage.content
in
Cpdf.process_xobjects
pdf page (change_font_size_ops dx dy source_size target_size);
{page with Pdfpage.content = content'}
in
Cpdf.process_pages change_font_size_page pdf range
(* Main function *) (* Main function *)
let go () = let go () =
@ -3949,7 +3962,7 @@ let go () =
let pdf = get_single_pdf args.op false in let pdf = get_single_pdf args.op false in
let range = parse_pagespec pdf (get_pagespec ()) in let range = parse_pagespec pdf (get_pagespec ()) in
let dx, dy = parse_coordinate pdf args.coord in let dx, dy = parse_coordinate pdf args.coord in
write_pdf false (change_font_size pdf range dx dy target_size) write_pdf false (change_font_size pdf range dx dy args.fontsize target_size)
let parse_argv () = let parse_argv () =
if args.debug then if args.debug then