Because the rendering backend support injecting PDF comments (annotations) into the document,
we can use some XML inside the HTML markup to encase the comment. This example paragraph has a comment inserted
<comment icon-type="comment"> <comment-body> <block> <title>Sample PDF Comment</title> <comment-text>This is comment text. You cannot have any markup in this element, only the textual content will be used.</comment-text> </block> </comment-body> </comment>
We have implemented some CSS to style these comments as popup ballons, much like they would be in the PDF. This is another paragraph with different
comments
You can set the color
and opacity
of the annotation using css styles. These will also carry through to the PDF.
The examples on this page all have different colors assigned which you can do in many ways (like through classes) and the last example shows
a different opacity applied.