1

When annotating a PDF with Adobe Acrobat to suggest a new text insertion, Acrobat makes a very nice job by doing this:

enter image description here

When using e.g. Abbyy Finereader, it denotes it by this:

enter image description here,

not as nice but clear and acceptable.

But when using pdfcomment, it looks like this:

enter image description here

It is huge, ugly and not at all clear where the insertion should take place (btw it should go after the word "water", who would have guessed). Adobe design is by far the best, Abbyy is acceptable, pdfcomment's way is useless since the editor has no idea where the text is supposed to come.

Now there is a post that concludes that icons for markup cannot be changed (so how does Adobe do that?). Is there a way to adjust to orientation, size and position of the triangle so that it is at least clear where the insertion should occur - to get to the Abbyy style at least.


To generate the latex comment, you can use MWE:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[svgnames,rgb]{xcolor}
\usepackage{pdfcomment}
\definestyle{MyInsertStyle}{color=Cyan,date,icon=Insert,voffset=0pt}
\newcommand{\ins}[2]{\pdfcomment[style=MyInsertStyle,author={#1}]{#2}}
\begin{document}
This is a test document to show annotation in LaTeX vs Adobe Acrobat. It shows how inserted text appears nicely in Acrobat while pdfcomment does a poor job. The inserted text will appear right after the word ``here'': here. In LaTeX, it is generated by pdfcomment here\ins{me}{New text to be inserted.}. We can have some more text here.
\end{document}

To generate adobe comment, just open adobe and annotate with text insert.

2
  • provide an small example with the adobe version and one with the pdfcomment version (with tex file) that one can use to check the code. Aug 25, 2023 at 13:49
  • @UlrikeFischer I have provided LaTeX code to generate the insert annotation with pdfcomment.
    – atapaka
    Aug 28, 2023 at 14:07

1 Answer 1

4

With icon=Insert you are using an icon predefined by the pdf viewer. Adobe uses an appearance, a small graphic that they defined. You can define your own graphics, e.g. with tikz, but it needs a bit fiddling (also with the offsets) and experimenting to get something nice looking:

\DocumentMetadata{} %loads pdfmanagement for the xform-command.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[svgnames,rgb]{xcolor}
\usepackage{pdfcomment,tikz}
\makeatletter
\ExplSyntaxOn
% create an xform command:
\pdfxform_new:nnn {AP1}{}{\tikz{\draw[use~as~bounding~box](0,0)rectangle(1,1);\draw[red,line~width=2pt,->](0.5,0)--++(0,1);}}
\newcommand\myappearance{AP1}
\AddToHook{cmd/pc@annot@text/before}{/AP<</N~\pdfxform_ref:o{\myappearance}>>}
\ExplSyntaxOff
\definestyle{MyInsertStyle}{color=Cyan,date,icon=Insert,hoffset=-0.5cm,voffset=-\normalbaselineskip}
\newcommand{\ins}[2]{\pdfcomment[style=MyInsertStyle,author={#1}]{#2}}
\begin{document}
This is a test document to show annotation in LaTeX vs Adobe Acrobat. It shows how inserted text appears nicely in Acrobat while pdfcomment does a poor job. The inserted text will appear right after the word ``here'': here. In LaTeX, it is generated by pdfcomment here\ins{me}{New text to be inserted.}. We can have some more text here.
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .