SourceForge has been redesigned. Learn more.

Positon of PDWidgetAnnotation

  • TreNrod

    TreNrod - 2008-07-03


    first thank you for your very good tool/lib.

    I got problems extracting the Positioninformation from a PDF which is gernerated by the HTML2PDF tool in the current version of adobewriter(quess its 9). This tool in adobe extracts even Textboxes, Comboboxes and RadioButtons.

    I got every position from any Annotation-objects by the methodgetNormalizedRectangle() method, except when its a PDWidgetAnnotation object i recive always 0.0 as X and Y Positions.

    • mtraut

      mtraut - 2008-07-04

      Hi, thanks using jPod!

      It seems you found a little inconsistency with the API. "getNormalizedRectangle" should deliver a rectangle whose width is positive. In addition, the method in PDWidgetAnnotation does take into account the rotation (which is available with widgets only), but does it by skipping the position (which is wrong..). We will fix that.

      You can workaround by falling back simply to "getRectangle", returning the rectangle as defined in the annotation. You can still normalize it using "getRectangle().copy().normalize()" if you need to assert extension in positive coordinate direction.


Log in to post a comment.