duplicate note problem - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC: duplicate note problem

duplicate note problem 5 years 3 months ago #3413

  • truculent
  • truculent's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 64
  • Thank you received: 0
hi i add new button too toolbar for add note in custom position !
i set touch x,y & when user press save button i pass x&y to pos x & pos y!
it's work Like charm :)
but my problem is when open a creatED note & again press save button it create new Note :(

-(void)OnSaveTextAnnot:(NSString *)textAnnot
{
[m_view vAddTextAnnot:posx :posy :textAnnot];
wantAddNote = false;
}

how i can fix it ?

i want only update content of note :(

Please Log in or Create an account to join the conversation.

Last edit: by patel_patel_patel.

duplicate note problem 5 years 3 months ago #3417

  • stronglee
  • stronglee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 92
  • Karma: 1
  • Thank you received: 2
Hi,

[m_view vAddTextAnnot:posx :posy :textAnnot]; this method will create a new TextAnnot icon.

when press addnote button in toolbar,
-(void)OnSaveTextAnnot:(NSString *)textAnnot
{
[m_view vAddTextAnnot:posx :posy :textAnnot];
wantAddNote = false;
}
this method just use to create new textAnnot,

when you single tap the textAnnot icon ,use a new method to Modify textAnnot

-(void)vModifyTextAnnot:(int)x :(int)y :(NSString *)text
{
struct PDFV_POS pos;
[m_view vGetPos:&pos:x:y];
if(pos.pageno>=0)
{
PDFVPage *vpage = [m_view vGetPage:pos.pageno];
PDF_PAGE page = [vpage GetPage];

float pdf_x = [vpage ToPDFX:x :[m_view vGetX]];
float pdf_y = [vpage ToPDFY:y :[m_view vGetY]];

if( page != NULL )
{
PDF_MATRIX mat = [vpage CreateMatrix];
//PDF_ANNOT annot = Page_getAnnot( page, Page_getAnnotCount(page) - 1 );
PDF_ANNOT annot = Page_getAnnotFromPoint(page, x, y);
Page_setAnnotPopupText(page, annot, [text UTF8String]);
Matrix_destroy(mat);
}
}
}
The following user(s) said Thank You: patel_patel_patel

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum