Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

Problems updating existing annotations

More
IP: 192.168.0.70 12 years 2 months ago #4958 by sparklellama
If you have a Page.Annotation object (here called mAnnotation) and you increase the stroke width as follows...
Code:
mAnnotation.SetStrokeWidth(largerStrokeWidth);

And then refresh the view like this…..
Code:
mPdfView.vRender(somePDFVPage);

The annotation updated with a new stroke with, but there are two problems.


  • The bounding box of the annotation is not expanded, so the new (larger) stroke width is displayed clipped at the edges.

  • The reference to the annotation in mAnnotation becomes invalid, as the Annotation itself appears to move to a new location in memory. You cannot perform subsequent operations on the annotation or reliably get a reference to the new version of it.

  • Are these bugs in the library, or do you think I might have missed something?

    Thanks
    More
    IP: 192.168.0.70 12 years 2 months ago #4960 by radaee
    you can modify bounding by:

    Annotation.GetRect
    //then modify rect coordinate
    Annotation.SetRect

    annotation object are not valid after vRender invoked.
    you can record index of Annotation by a loop in Annotation object.
    More
    IP: 192.168.0.70 12 years 2 months ago - 12 years 2 months ago #4961 by radaee
    i'll modify some codes, for convenience.
    plz wait next version.
    in next version, you can invoke:
    Code:
    Annotation.GetIndexInPage()

    and bounding box is auto increasing when you Invoke Annotation.SetStrokeWidth().
    Last edit: 12 years 2 months ago by .
    More
    IP: 192.168.0.158 12 years 2 months ago #4967 by nermeen
    A new version 2.9.7beta7 has been pubblished..

    it has the following modifications:
    - NEW interface Annotation.GetIndexInPage()
    - bounding box auto increasing, when user invoke Annotation.SetStrokeWidth()
    More
    IP: 192.168.0.70 12 years 2 months ago - 12 years 2 months ago #4982 by sparklellama
    GetIndexInPage() verified as working. Thank you.
    Still working on second item.
    Last edit: 12 years 2 months ago by [email protected].
    More
    IP: 192.168.0.70 12 years 2 months ago #4985 by sparklellama
    Thanks for the update to the bounding box. It works but there is a problem. If the annotation has been moved, the bounding box returns to its original position, and the annotation becomes clipped. I have created an image with some screen shots to help show the problem. Do you think that the library can be updated to correct this issue?

    Thank you very much. Image can be found at the following URL.

    www.asdeqlabs.com/wp-content/uploads/2014/01/pdfissue.png
    Time to create page: 0.439 seconds
    Powered by Kunena Forum