vendredi 7 mai 2021

Poppler qt-5, link navigation on rendered QImage

Нi everyone

My question:

How i can link my links in PDF and rendered QImage?

What i want: user click on some position on Qimage, i get this link (if it has) and go to some page. I can get all links from page:

Poppler::Page*  pPage = NULL;
pPage = GetPage(nPageNum);
pPage->links();

Get in QDebug

pPage->links() (0x1751670, 0x1752210, 0x16c3e80, 0x173f550, 0x1a14ed0, 0x1751160, 0x173f600, 0x1751210, 0x1a14300, 0x1a143b0, 0x1a14460, 0x174fde0, 0x174fe90, 0x174ff40, 0x174fff0, 0x1744b80, 0x17512c0, 0x1750160, 0x1750180, 0x1750230, 0x17502e0, 0x1750390, 0x176a460, 0x176a510, 0x176a5c0, 0x176a670, 0x17448f0, 0x17449a0, 0x1744a50, 0x1744b00, 0x1744b60, 0x1751c90, 0x1744c30, 0x1751cb0, 0x1752000, 0x1751a40, 0x1751b40, 0x1751bf0, 0x17509e0, 0x1751d70, 0x1751e20, 0x1751ed0, 0x1751f80, 0x1751fe0, 0x1750d30, 0x1750820, 0x17508d0, 0x1750980)

Render

QImage imageBuffer = pPage->renderToImage(72.0, 72.0, -1, -1, -1, -1);

I can find a position which clicked on Qimage, but i can't undestand how to connect these two things. Thanks.

Aucun commentaire:

Enregistrer un commentaire