pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Lehmkuehler <andr...@lehmi.de>
Subject Re: How to draw annotation rectangle in PDF
Date Sun, 23 Jan 2011 14:52:24 GMT
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


Mime
View raw message