Request to add the free text annotation feature in Windows Universal sample - 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...
Tell us about your applications and your projects.
  • Page:
  • 1

TOPIC: Request to add the free text annotation feature in Windows Universal sample

Request to add the free text annotation feature in Windows Universal sample 8 months 1 hour ago #13624

  • nermeen
  • nermeen's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
To add a free text annotation, you can use
public bool AddAnnotEditbox(PDFRect rect, int line_clr, float line_w, int fill_clr, float tsize, int text_clr);
example:
PDFPage page = m_doc.GetPage(i);
page.ObjsStart();
var rect = new PDFRect
 {
          bottom = 250,
           left = 150,
           right = 250,
           top = 150
 };               
page.AddAnnotEditbox(rect, 0x000000, 3, 0xffffff, 10, 0x000000);

to add text to the page content, you can check add text part in Add text to document (Windows)

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

Request to add the free text annotation feature in Windows Universal sample 8 months 45 minutes ago #13627

  • nermeen
  • nermeen's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
AddAnnotEditbox -> annotations are supported starting from the professional license.

Add text to page content (add text to pdf directly) -> a premium license is needed.

Yes, you can check the sample code.

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

Request to add the free text annotation feature in Windows Universal sample 7 months 4 weeks ago #13630

  • nermeen
  • nermeen's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
Dear Alok,
as you see the multiline text box are handled with modal edit-text to avoid some limitations and lack of speed of MS Windows APIs.
For these reasons I’m sorry to inform you that we won’t support inlined multiline edit text.

To add the support of free-text annotation, as the rect annotation for example, you need to:
(the method body can be added easily as the rect annotation for example)

Add a new status in PDFV_STATUS
...
STA_LINE = 8,
STA_FREE_TEXT = 9
}
Add a method to start the free-text status (and call it based on your user event)
public bool vFreeTextStart()
	{
		if (m_doc == null || !m_doc.CanSave || m_pages == null) return false;
		if (m_status == PDFV_STATUS.STA_NONE)
		{
			m_status = PDFV_STATUS.STA_FREE_TEXT;
			...
		}
		return false;
	}
Add a method to cancel the free-text status (and call it based on your user event)
public void vFreeTextCancel()
	{
		if (m_status == PDFV_STATUS.STA_FREE_TEXT)
		{
			...
		}
	}
Add a method to end the free-text status and add the annotation (and call it based on your user event)
public void vFreeTextEnd()
	{
		if (m_status == PDFV_STATUS.STA_FREE_TEXT)
		{
			...
		}
	}
Add a method to handle touch down event
private bool OnFreeTextTouchBegin(Point point)
    {
		...
	}
Add in vOnTouchDown method a call to a method to handle the free-text annotation
...
if (OnFreeTextTouchBegin(pt)) return;
...
Add a method to handle touch move event
private bool OnFreeTextTouchMove(Point point)
    {
		...
	}
Add in vOnTouchMove method a call to a method to handle the free-text annotation
...
if (OnFreeTextTouchMove(pt)) return;
...
Add a method to handle touch end event
private bool OnFreeTextTouchEnd(Point point)
    {
		...
	}
Add in vOnTouchUp method a call to a method to handle the free-text annotation
...
if (OnFreeTextTouchEnd(pt)) return;
...
Add a method to draw the free-text annotation
private void drawFreeText()
	{
		...
	}
Add in vDraw method a call to a method to draw the free-text annotation
...
	drawAnnot();
	drawInk();
	drawEllipse();
	drawRects();
	drawLines();
	drawFreeText();
	...

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

Last edit: by nermeen.

Request to add the free text annotation feature in Windows Universal sample 7 months 4 weeks ago #13632

  • nermeen
  • nermeen's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
You can change the size of the Editbox annotation using PDFAnnot.Rect.

providing user ribbon on edges of editbox -> This is not supported for the same reasons of not supporting inlined multiline edit text.

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

Request to add the free text annotation feature in Windows Universal sample 7 months 3 weeks ago #13635

  • nermeen
  • nermeen's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
Sales team has responded to the ticket.

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

  • Page:
  • 1
Powered by Kunena Forum