Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Tell us about your applications and your projects.

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

More
IP: 192.168.0.71 7 years 11 months ago #13624 by nermeen
To add a free text annotation, you can use
Code:
public bool AddAnnotEditbox(PDFRect rect, int line_clr, float line_w, int fill_clr, float tsize, int text_clr);
example:
Code:
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)
More
IP: 192.168.0.71 7 years 11 months ago #13627 by nermeen
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.
More
IP: 192.168.0.71 7 years 11 months ago - 7 years 11 months ago #13630 by nermeen
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)
Code:
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)
Code:
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)
Code:
public void vFreeTextEnd() { if (m_status == PDFV_STATUS.STA_FREE_TEXT) { ... } }
Add a method to handle touch down event
Code:
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
Code:
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
Code:
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
Code:
private void drawFreeText() { ... }
Add in vDraw method a call to a method to draw the free-text annotation
Code:
... drawAnnot(); drawInk(); drawEllipse(); drawRects(); drawLines(); drawFreeText(); ...
Last edit: 7 years 11 months ago by nermeen.
More
IP: 192.168.0.71 7 years 11 months ago #13632 by nermeen
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.
More
IP: 192.168.0.71 7 years 11 months ago #13635 by nermeen
Sales team has responded to the ticket.
Time to create page: 0.395 seconds
Powered by Kunena Forum