New: Create and edit Word documents with DOCX Editor in WebViewer

Bringing Cloudy Annotation Creation to PDFTron SDK 6.10.4 for UWP

By Mohammad Yasser Khan | 2019 May 31

Sanity Image

We are excited to announce our new official UWP SDK release (version 6.10.4). Based on the success of the CloudCreate, PolygonCreate and PolylineCreate tools with PDFTron SDKs for Android & iOS platforms and high customer demand we are pleased to introduce them to PDFTron SDK for UWP.

Markup Annotations for Architecture, Engineering and Construction

Whether you are an architect working on the next big idea in your office on your Windows 10 desktop or an engineer solving complex problems on the field working with your Surface device, we offer seamless and smooth creation of these much loved annotations with the user interaction designed to optimize usability based on the type of device in use.

CloudCreate, PolygonCreate and PolylineCreate tools are initialized in the CreateTool method of the ToolManager class. Following sample method shows how you can do that in your custom code:

public Tool CreatePolygonTools(ToolType mode, ToolManager toolManager, PDFViewCtrl pdfView)
{
    Tool tool = null;

    switch (mode)
    {
        case ToolType.e_polyline_create:
            tool = new PolylineCreate(pdfView, toolManager);
            break;
        case ToolType.e_polygon_create:
            tool = new PolygonCreate(pdfView, toolManager);
            break;
        case ToolType.e_cloud_create:
            tool = new CloudCreate(pdfView, toolManager);
            break;
        default:
            tool = new Pan(pdfView, toolManager);
            break;
    }
   
    return tool;
}

If you are writing your own code to save the Cloudy, Polygon and Polyline annotations then you can use the following sample method to commit the annotations:

private void CommitPolygonTools(ToolType mode, ToolManager toolManager)
{
    if (mode == ToolType.e_polyline_create)
    {
        PolylineCreate polylineTool = toolManager.CurrentTool as PolylineCreate;
        if (polylineTool != null)
        {
            polylineTool.CommitAnnotation();
        }
    }
    else if (mode == ToolType.e_polygon_create)
    {
        PolygonCreate polygonTool = toolManager.CurrentTool as PolygonCreate;
        if (polygonTool != null)
        {
            polygonTool.CommitAnnotation();
        }
    }
    else if (mode == ToolType.e_cloud_create)
    {
        CloudCreate cloudTool = toolManager.CurrentTool as CloudCreate;
        if (cloudTool != null)
        {
            cloudTool.CommitAnnotation();
        }
    }
}

Following screenshots show the new tools and the cloudy polygon drawn on the document:

Blog image
Blog image
Blog image

Improved search:

When we see a bug... we squish it... err fix it. No mercy on software bugs! This update is no different. We have fixed an issue that cropped up in the text search in Complete Reader sample project.

For a full list of changes, please see the PDFTron SDK 6.10.4 for UWP changelog.

We hope you like these changes and any feedback is greatly appreciated. Please don't hesitate and contact us if you have any questions or suggestions. We also have many exciting new features planned for the coming weeks and months. Stay tuned...

Sanity Image

Mohammad Yasser Khan

Share this post

email
linkedIn
twitter