Disable soft mask work for v2.6

This commit is contained in:
John Whitington 2023-06-21 16:30:33 +01:00
parent 09d0e912ca
commit 45db007f56
2 changed files with 3 additions and 5 deletions

View File

@ -1,7 +1,7 @@
open Pdfutil open Pdfutil
open Cpdferror open Cpdferror
(* FIXME: Need to take account of inherited resources (among Xobjects and their children - pages (*(* FIXME: Need to take account of inherited resources (among Xobjects and their children - pages
are regularized upon loading). Would be nice to see a failing example first though. are regularized upon loading). Would be nice to see a failing example first though.
FIXME: What would happen if a pattern was used in a transforming and non-transforming way - we FIXME: What would happen if a pattern was used in a transforming and non-transforming way - we
would have to dedupulicate - again, no failing example available. *) would have to dedupulicate - again, no failing example available. *)
@ -69,7 +69,7 @@ let change_softmask_matrices_page pdf tr page =
let matrix' = Pdftransform.matrix_compose (Pdftransform.matrix_invert tr) matrix in let matrix' = Pdftransform.matrix_compose (Pdftransform.matrix_invert tr) matrix in
let dict = Pdf.add_dict_entry dict "/Matrix" (Pdf.make_matrix matrix') in let dict = Pdf.add_dict_entry dict "/Matrix" (Pdf.make_matrix matrix') in
Pdf.addobj_given_num pdf (objnum, dict)) Pdf.addobj_given_num pdf (objnum, dict))
objnums objnums*)
(* When we transform a page by wrapping in an [Op_cm], we must also (* When we transform a page by wrapping in an [Op_cm], we must also
change any /Matrix entries in (some) pattern dictionaries, including inside change any /Matrix entries in (some) pattern dictionaries, including inside
@ -139,7 +139,7 @@ and change_pattern_matrices_xobject pdf tr xobj xobjnum =
| _ -> () | _ -> ()
let change_pattern_matrices_page pdf tr page = let change_pattern_matrices_page pdf tr page =
change_softmask_matrices_page pdf tr page; (*change_softmask_matrices_page pdf tr page;*)
let used = patterns_used pdf page.Pdfpage.content page.Pdfpage.resources in let used = patterns_used pdf page.Pdfpage.content page.Pdfpage.resources in
(*Printf.printf "Patterns for translation, due to being used as cs / CS"; (*Printf.printf "Patterns for translation, due to being used as cs / CS";
Hashtbl.iter (fun x _ -> Printf.printf "%s " x) used; Hashtbl.iter (fun x _ -> Printf.printf "%s " x) used;

View File

@ -2,8 +2,6 @@
val change_pattern_matrices_page : Pdf.t -> Pdftransform.transform_matrix -> Pdfpage.t -> Pdfpage.t val change_pattern_matrices_page : Pdf.t -> Pdftransform.transform_matrix -> Pdfpage.t -> Pdfpage.t
val change_softmask_matrices_page : Pdf.t -> Pdftransform.transform_matrix -> Pdfpage.t -> unit
(** Print page info (Mediabox etc) to standard output. *) (** Print page info (Mediabox etc) to standard output. *)
val output_page_info : Pdf.t -> int list -> unit val output_page_info : Pdf.t -> int list -> unit