-stamp-on etc now take account of cropbox

This commit is contained in:
John Whitington 2016-01-08 12:23:14 +00:00
parent 042f64707e
commit 18aea65d7e
1 changed files with 4 additions and 1 deletions

View File

@ -2167,6 +2167,7 @@ let do_stamp fast position topline midline scale_to_fit isover pdf o u opdf =
Pdfops.Op_cm Pdfops.Op_cm
(Pdftransform.matrix_of_transform (Pdftransform.matrix_of_transform
[Pdftransform.Translate (dx, dy); [Pdftransform.Translate (dx, dy);
Pdftransform.Translate (txmin, tymin);
Pdftransform.Scale ((sxmin, symin), scale, scale)]) Pdftransform.Scale ((sxmin, symin), scale, scale)])
in in
Pdfpage.prepend_operators pdf [scale_op] ~fast o Pdfpage.prepend_operators pdf [scale_op] ~fast o
@ -2178,7 +2179,9 @@ let do_stamp fast position topline midline scale_to_fit isover pdf o u opdf =
let dx, dy = stamp_shift_of_position topline midline sw sh w h position in let dx, dy = stamp_shift_of_position topline midline sw sh w h position in
let translate_op = let translate_op =
Pdfops.Op_cm Pdfops.Op_cm
(Pdftransform.matrix_of_transform [Pdftransform.Translate (dx, dy)]) (Pdftransform.matrix_of_transform
[Pdftransform.Translate (txmin, tymin);
Pdftransform.Translate (dx, dy)])
in in
Pdfpage.prepend_operators pdf [translate_op] ~fast o Pdfpage.prepend_operators pdf [translate_op] ~fast o
in in