I would like to make a question because I searched on StackExchange without finding a good solution. Before importing the images on a Latex document I am used to automatically compress them to a definite resolution (therefore the size) of the images according the needs: report to be printed or sent via email. I would like to understand if there is a possibility to automatically compress them with PDFLatex maintaining also the hyperlinks. I know it is possible to use external pdf compressors to adjust the final size of the final document but the links inside it get lost. I know exists a package called Deprecate
but on the readme file it is reported that it works only on Linux systems.
It would be great if there is a package allowing you to set the images resolution on the preamble (ex. 300 dpi) and change it according the need you have with that particular document. It looks strange to me that tehe is nothing able to do this. Below I post a simple generic code with image inclusion and hyperlink.
\documentclass[11pt]{article}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{figure}[h!]
\vspace{-1 cm}
\flushleft\hspace{-1.5 cm}
\href{https://www.link.com/}\includegraphics[height=1.5cm, keepaspectratio]{example-image-duck}
\caption{Caption}\label{fig:logo}
\end{figure}
\end{document}
Thank you in advance for every eventual support.
\usepackage[pdfa]{hyperref}
, see also github.com/latex3/hyperref/issues/74, but this will hopefully change in the future. – Ulrike Fischer Dec 14 '20 at 9:01