-
I am trying to create a PDF hyperlink shown by a custom icon, made clickable. So I want to draw a little icon in a big PDF file, want to render the icon vectorially so I'm using show_pdf_page() to render it. The icon is the file icon.pdf. The big PDF file is generated by Chrome in Windows (print->save to pdf). The file is test.pdf. The problem for me is that the icon and the clickable region are different, even if specified by the same rectangle. The problem happens for some big PDFs and not in others (attached is an offending one) Sample code:
The result is result.pdf. One can see that the clickable region (visible by a hand mouse cursor when hovering over it) is outside the icon (is about under the title). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There is a problem with automatically recognizing whether a page must be cleaned before inserting stuff - a new feature in this version. So you must use |
Beta Was this translation helpful? Give feedback.
There is a problem with automatically recognizing whether a page must be cleaned before inserting stuff - a new feature in this version.
So you must use
page.clean_contents()
directly afterpage = doc[0]
.