Hack to allow -shift to be used with -add-text to alter position
arbitrarily
This commit is contained in:
parent
a4c0aad692
commit
9bc5f38ec6
6
cpdf.ml
6
cpdf.ml
|
@ -1816,7 +1816,9 @@ let addtext
|
|||
then numstring
|
||||
else implode (many '0' (w - String.length numstring)) ^ numstring))]
|
||||
in
|
||||
let shifts = Cpdfcoord.parse_coordinates pdf shift in
|
||||
let addtext_page num page =
|
||||
let shift_x, shift_y = List.nth shifts (num - 1) in
|
||||
let resources', unique_extgstatename =
|
||||
if opacity < 1.0 then
|
||||
let dict =
|
||||
|
@ -1891,10 +1893,10 @@ let addtext
|
|||
in
|
||||
match font with
|
||||
| Some f ->
|
||||
ops longest_w metrics x y rotate (hoffset +. joffset) voffset outline linewidth
|
||||
ops longest_w metrics (x +. shift_x) (y +. shift_y) rotate (hoffset +. joffset) voffset outline linewidth
|
||||
unique_fontname unique_extgstatename colour fontsize text
|
||||
| None ->
|
||||
ops longest_w metrics x y rotate (hoffset +. joffset) voffset outline linewidth
|
||||
ops longest_w metrics (x +. shift_x) (y +. shift_y) rotate (hoffset +. joffset) voffset outline linewidth
|
||||
fontname None colour fontsize text
|
||||
in
|
||||
let newresources =
|
||||
|
|
Loading…
Reference in New Issue