more
This commit is contained in:
parent
4bd79e01bb
commit
847f878fa1
|
@ -84,7 +84,7 @@ let hard_box pdf range boxname mediabox_if_missing fast =
|
||||||
range
|
range
|
||||||
|
|
||||||
(* Convert a page to a Form XObject *)
|
(* Convert a page to a Form XObject *)
|
||||||
let xobject_of_page pdf page =
|
let xobject_of_page ~fast pdf page =
|
||||||
let concatted_streams =
|
let concatted_streams =
|
||||||
let streams = map (Pdf.direct pdf) page.Pdfpage.content in
|
let streams = map (Pdf.direct pdf) page.Pdfpage.content in
|
||||||
iter (Pdfcodec.decode_pdfstream pdf) streams;
|
iter (Pdfcodec.decode_pdfstream pdf) streams;
|
||||||
|
@ -102,7 +102,7 @@ let xobject_of_page pdf page =
|
||||||
Got concatted_streams)}
|
Got concatted_streams)}
|
||||||
|
|
||||||
let shift_page ?(fast=false) dxdylist pdf pnum page =
|
let shift_page ?(fast=false) dxdylist pdf pnum page =
|
||||||
let xobj = xobject_of_page pdf page in
|
let xobj = xobject_of_page ~fast pdf page in
|
||||||
let dx, dy = List.nth dxdylist (pnum - 1) in
|
let dx, dy = List.nth dxdylist (pnum - 1) in
|
||||||
let transform_op =
|
let transform_op =
|
||||||
Pdfops.Op_cm (Pdftransform.matrix_of_op (Pdftransform.Translate (dx, dy)))
|
Pdfops.Op_cm (Pdftransform.matrix_of_op (Pdftransform.Translate (dx, dy)))
|
||||||
|
|
Loading…
Reference in New Issue