Hi
I am trying to experiment with annotations.
I want the annotation to lock into place rather than scroll down with
the page.
I have been trying to use:
Boolean locking = txtMark.isLocked();
txtMark.setLocked(locking);
but however I change it around it has no effect.
this portion of code is here:
PDAnnotationTextMarkup txtMark = new
PDAnnotationTextMarkup(PDAnnotationTextMarkup.SUB_TYPE_HIGHLIGHT);
txtMark.setConstantOpacity((float)0.9); //20% transparent
Boolean locking = txtMark.isLocked();
txtMark.setLocked(locking);
// Set the rectangle containing the markup
float textWidth = font.getStringWidth("PDFBox") / 1000 * 18;
PDRectangle position = new PDRectangle();
position.setLowerLeftX(INCH);
position.setLowerLeftY( ph - INCH - 18);
position.setUpperRightX(INCH + textWidth);
position.setUpperRightY(ph - INCH);
txtMark.setRectangle(position);
Thank you for any advice you can give
Gerry
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]