Hyperref and Pgfpages Resize

when I use pgfpages to resize my document all my hyperref links got displaced.

I need to scale my A4 document to 240mm x 170mm. But I want to keep all my bookmarks and document metadata.

Got anyone a solution or workaround?

Thanks!

Here is my MWE, note the cyan colored box, which is the actual clickable link to the website.

\documentclass[12pt, a4paper, oneside]{book}
\usepackage{pgfpages}
\pgfpagesuselayout{resize to}[physical paper height=240mm, physical paper width=170mm]

\usepackage[
]{hyperref}
\usepackage{lipsum}

\begin{document}
\lipsum[2]\bigbreak
\url{https://tex.stackexchange.com}
\end{document}

• well theoretically it is imho possible to calculate correct annotation coordinates. Pratically it is difficult. – Ulrike Fischer Apr 30 at 19:39

Unfortunately this is a long established limit using TeX to include PDF with links etc.

One possible method is to use a PDF rescale program and even Adobe products can have dificulties. I find the "easiest" to use is an online service that can either re define page (without scaling = similar to cropping) or scale (with/without constrained ratio) here are the results NOTE the page size is accurate to nearest 0.1 mm

• That's not really a problem with including pdf (annotation simply vanish here) but of the rescaling. annotation coordinates are absolute page coordinates and don't honor transformations/scalings. – Ulrike Fischer May 1 at 9:32
• @UlrikeFischer I could not see the relocated link highlights in second include (it may be the reader I used dropped them since it replaces missing ones with its own in the correct position) is there a setting I missed to show them – KJO May 1 at 9:41
• No, I only commented your first sentence. This here is a different problem to the standard "\includepdf loose links"-problem. – Ulrike Fischer May 1 at 9:51
• Ok @UlrikeFischer would it be clearer to say link scaling is one of a few traditional problems when \including pdf's with links – KJO May 1 at 11:19