Print Page | Close Window

Dynamic annotations position change

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2742
Printed Date: 31 May 25 at 11:52AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Dynamic annotations position change
Posted By: sdhanaraj7
Subject: Dynamic annotations position change
Date Posted: 27 Sep 13 at 1:59PM
Hi friends,

I want to change the position of the newly added annotation and save into the database. I want to create as many annotations and change the position (top, left) of any annotation. I am using asp.net with c#.

Waiting for your reply. Need urgent




Replies:
Posted By: AndrewC
Date Posted: 30 Sep 13 at 7:18AM
Can you try using

    QP.SetAnnotDblProperty(annotID, 105, left);
    QP.SetAnnotDblProperty(annotID, 106, top);

Andrew.



Posted By: sdhanaraj7
Date Posted: 30 Sep 13 at 7:48AM
Hi Andrew,

Thanks for reply. 

But I don't want to set the top and left positions statically:
 i.e.  QP.SetAnnotDblProperty(annotID, 105, 200). 
When i move the annotation, get the new top and left position and save into the database. 

Is there any function to get the new coordinates. 

Waiting for your reply.

Regards,
Dhanaraj.s


Posted By: AndrewC
Date Posted: 30 Sep 13 at 7:55AM
More information is needed. 

Are you saying when the user moves the annotation around with the mouse that you want to get the coordinates of the Annotation that was just moved ?

What database are you talking about ?  

QP.GetAnnotDblProperty(annotID, 105) will return the Left position of the annotation.

Debenu Quick PDF Library does not have and GUI functionality to work with Windows or ASP.NET.

Andrew.


Posted By: sdhanaraj7
Date Posted: 30 Sep 13 at 9:03AM
Hi Andrew,

When a pdf file with annotations is opened/ newly created, if i move the annotation to a new place in the document  and now i want to save the pdf file using my gui. When i again opened the pdf file, the annotation should be displayed in the new place(where i moved the annotation).  Actually my requirement is user can add the annotation and user can change the annotation position and the user can save the annotation.

Regards,
Dhanaraj. S


Posted By: AndrewC
Date Posted: 30 Sep 13 at 2:02PM
Dhanara,

a. Do you have an application working with Debenu Quick PDF Library already ?

I can assume then that you have QPL code to read the positons of the annotations and your create graphics nodes in a special ASP.NET Graphics library which supports moving, resizing, panning, zooming.  What annotation types do you need to support ? Text, Note, Markup ?

or

b. Are you in the process of developing this new functionality and looking for a simple component to do all the moving, editing for you ?


Andrew.



Posted By: sdhanaraj7
Date Posted: 30 Sep 13 at 2:52PM
Andrew,

Thanks for your reply

a ) I need to support Annotation type for "Note". I am developing a new component in asp.net/c# to move, edit and locking an annotation for a user specific. 

I want  sample code for reading a dynamic annotation position. I dont have QPL code to read the positions

waiting for your reply. 

regards,
Dhanaraj. S


Posted By: AndrewC
Date Posted: 01 Oct 13 at 7:11AM
Here is some sample code to extract the Annotation properties.

            QP.LoadFromFile("annots.pdf", "");

            for (int i = 1; i <= QP.AnnotationCount(); i++)
            {
                if (QP.GetAnnotStrProperty(i, 101) == "Popup")    // Note type annotation.
                {
                    string name = QP.GetAnnotStrProperty(i, 103);

                    double left = QP.GetAnnotDblProperty(i, 105);
                    double top = QP.GetAnnotDblProperty(i, 106);
                }
            }




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk