- Posts: 67
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about iOS development and PDF
How to get the x and y position when their is underline,highlight and strikeout
- apdeveloper
- Topic Author
- Offline
- Senior Member
-
Less
More
IP: 114.143.35.181
6 years 7 months ago #14455
by apdeveloper
How to get the x and y position when their is underline,highlight and strikeout was created by apdeveloper
I want to get the position of x and y when underline,highlight and strikeout is done on pdf like when we click on annotation delegate method of did tap annot function is getting called and x and y position is getting log so similarly that x and y pos should get log when i start to select the text and do underline,highlight and strikeout.
IP: 111.196.240.106
6 years 7 months ago - 6 years 7 months ago #14457
by radaee
Replied by radaee on topic How to get the x and y position when their is underline,highlight and strikeout
Dear user:
you can get the position from PDFLayoutView.onTouchSelect(), follow the code line:
start point:
m_hold_x
m_hold_y
end point:
event.getX();
event.getY();
you can get the position from PDFLayoutView.onTouchSelect(), follow the code line:
Code:
case MotionEvent.ACTION_UP:
m_hold_x
m_hold_y
end point:
event.getX();
event.getY();
Last edit: 6 years 7 months ago by radaee.
- apdeveloper
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 67
- Thank you received: 0
IP: 114.143.80.249
6 years 7 months ago #14458
by apdeveloper
Replied by apdeveloper on topic How to get the x and y position when their is underline,highlight and strikeout
How to call this variable or method from RDPDFviewcontroller :
start point:
m_hold_x
m_hold_y
end point:
event.getX();
event.getY();
and one more thing i am using the older version of Radaeepdf so can i call this function when selector is clicked
-(bool)OnSelTouchBegin:(CGPoint)point.
start point:
m_hold_x
m_hold_y
end point:
event.getX();
event.getY();
and one more thing i am using the older version of Radaeepdf so can i call this function when selector is clicked
-(bool)OnSelTouchBegin:(CGPoint)point.
IP: 37.183.44.177
6 years 7 months ago - 6 years 7 months ago #14459
by federico
Replied by federico on topic How to get the x and y position when their is underline,highlight and strikeout
Dear apdeveloper,
You could check OnSelEnd method in RDPDFViewController that will give you 4 coordinates. x1 and y1 are start selection's coordinates and x2 and y2 are end selection's coordinates.
You could check OnSelEnd method in RDPDFViewController that will give you 4 coordinates. x1 and y1 are start selection's coordinates and x2 and y2 are end selection's coordinates.
Last edit: 6 years 7 months ago by federico.
- apdeveloper
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 67
- Thank you received: 0
IP: 123.252.243.145
6 years 7 months ago #14464
by apdeveloper
Replied by apdeveloper on topic How to get the x and y position when their is underline,highlight and strikeout
While adding the annot i am setting the name for the annot but still i am not getting the index of annot
-(void)vRemoveSelectorAnnot:(PDFAnnot *)annot
{
[self setReadOnly:false];
if (![self canSaveDocument]) {
[self vAnnotEnd];
NSLog(@"bbbbb---");
return;
}
m_status = sta_annot;
if( m_status != sta_annot ){
NSLog(@"aaaaa---");
return;
}
NSLog(@"Selected Page Annot NAme----%@",annot.getName);
[self setModified:YES force:NO];
//Action Stack Manger
PDFPage *page = [m_doc page:m_cur_page];
[actionManger push:ASDel alloc] initWithPage:m_cur_page page:page index:annot.getIndex;//Getting Error at this line while gtting index
[annot removeFromPage];
[self vAnnotEnd];
[m_view vRenderSync:m_cur_page];
[self refresh];
[m_doc save];
NSLog(@"Remove AnnotComplete---");
}
-(void)vRemoveSelectorAnnot:(PDFAnnot *)annot
{
[self setReadOnly:false];
if (![self canSaveDocument]) {
[self vAnnotEnd];
NSLog(@"bbbbb---");
return;
}
m_status = sta_annot;
if( m_status != sta_annot ){
NSLog(@"aaaaa---");
return;
}
NSLog(@"Selected Page Annot NAme----%@",annot.getName);
[self setModified:YES force:NO];
//Action Stack Manger
PDFPage *page = [m_doc page:m_cur_page];
[actionManger push:ASDel alloc] initWithPage:m_cur_page page:page index:annot.getIndex;//Getting Error at this line while gtting index
[annot removeFromPage];
[self vAnnotEnd];
[m_view vRenderSync:m_cur_page];
[self refresh];
[m_doc save];
NSLog(@"Remove AnnotComplete---");
}
IP: 37.183.44.177
6 years 7 months ago #14465
by emanuele
Replied by emanuele on topic How to get the x and y position when their is underline,highlight and strikeout
Hi,
in which case are you calling your vRemoveSelectorAnnot method?
You said "While adding the annot" but this code is removing the annotation.
in which case are you calling your vRemoveSelectorAnnot method?
You said "While adding the annot" but this code is removing the annotation.
Time to create page: 0.422 seconds