How do I get location of a certain block in PDF? #1275
Answered
by
pointlessone
shubhamdrip
asked this question in
Q&A
-
I want to add an image to a PDF. The PDF contains a rectangular box, whose position I do not know beforehand, inside which I need to add the image. How do I find the location of the box? |
Beta Was this translation helpful? Give feedback.
Answered by
pointlessone
Nov 16, 2022
Replies: 1 comment
-
Prawn doesn't provide anything for that. Prawn is concerned with generation of PDF and doesn't have any API to inspect the content. That said, there's |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
shubhamdrip
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prawn doesn't provide anything for that. Prawn is concerned with generation of PDF and doesn't have any API to inspect the content.
That said, there's
pdf-inspector
gem that does specifically that. PDF is not very good at providing metadata to identify a specific rectangle but maybe you'll have some luck with the gem.