Hi,

Am 20.01.2011 08:11, schrieb prashant mangate:
Hi,


I want to draw the rectangle on a existing PDF as a highlighter.

Existing PDF contains the table. and I want to highlight its cell by using
following code. But it display over the cell. It should looks like
transperent. (i.e highlighter)

contentStream.setNonStrokingColor(Color.pink);
contentStream.addRect(startX, startY+startY, width, height);
contentStream.fillRect(1.0f, 1.0f, 1.0f, 1.0f);
I guess your are looking for a Text markup Annotation. [1] provides some samples
for different types of annotations.
Have a look at chapter 12.5.6 Annotations types from [2] to learn more about
annotations.

BR
Andreas Lehmkühler

[1]
http://svn.apache.org/repos/asf/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/examples/pdmodel/Annotation.java
[2] http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf

Reply via email to