Can you tell me how to insert image which will be a link to for example page 20? I know how to make with normal text:
text \"Go to
Partly thanks to lightswitch05 for some prodding in the right direction, I've found a way to get the effect I want through this inelegant way:
bounding_box
(the page cursor
is at this point at the bottom of the image)|
' were needed to cover the image)Here's some example code (measurements not exact; there was a lot of tweaking involved):
bounding_box([0, cursor], width: 35) do
image open("http://mysite.com/remote_image.jpg"),
fit: [35, 35],
align: :center
move_up 35
transparent(0) do
formatted_text([{
text: "|||", # placeholder
size: 40,
link: "http://example.com/"
}], align: :center)
end
# stroke_bounds
end
Needless to say, this experience has got me looking a bit more at Wicked PDF in order to do what I think I want to do with PDFs.
I'm sure a better/more elegant solution exists, so I'm not planning on considering this my final answer.