12

I have a figure in the PDF format and there are some texts in the figure (pdf) are highlighted. However, when I include this PDF file into latex document, the highlights are automatically removed. Do you know to to preserve the highlights? I am using PdfLaTeX to compile the TeX documents. The minimal working example provide below:

\documentclass{article}
\usepackage{graphicx}
\begin{document}

\begin{figure}
\includegraphics[width=\linewidth]{figure}
\end{figure}

\end{document}

The figure in PDF format can be downloaded here. However, you can use any pdf file that contains highlights to see the problem.

  • 3
    Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Sean Allred Jul 9 '13 at 13:04
  • 10
    Your PDF figure contains PDF annotations, which are only supported by some PDF viewers. Basically, an annotation is not part of the figure, but a distinct object that is put on top of it, can be edited, moved around and so on. To become part of the image, it need to be "flattened", e.g., by printing into another PDF file. – Daniel Jul 9 '13 at 13:40
  • 1
    Thanks, Daniel. I found the same solution as yours. "Print as PDF" is a working solution. However, an advantaged of this solution is that it almost produces blank space and we need to crop it later on. – An Cong Tran Jul 9 '13 at 14:17
  • There is no blank space if you open the PDF and print it with Chrome. – Randel Mar 1 '18 at 13:54
9

If you highlight and annotate inside a PDF figure with tools such as Acrobat, Preview, or Evince, these elements do not become part of the PDF figure – they are stored as PDF annotations.

Basically, annotations are distinct objects that are put on top of the PDF figure, can be edited, moved around and so on by viewers that support this. They also may look differently in every viewer, as the PDF specifications only defines the annotation types and properties, but not how they are to be rendered on screen.

To have annotations become part of the figure, the PDF need to be "flattened", for instance, by printing it (including annotations) into another PDF file. However, this is not supported by many PDF viewers.

  • Acrobat has 'preflight' that can be used to flatten the pdf. Choose "PDF fixups -> Flatten annotations and form fields" in the profile list and go. – Shaohua Li Jul 7 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.