New: Create and edit Word documents with DOCX Editor in WebViewer
By Robson Pontin | 2020 Oct 29
Today, we are excited to announce version 8.0.1 of PDFTron’s UWP SDK.
In this release, we are adding support to build UWP applications targeting ARM64 devices, Annotation Manager support, a new C++ SDK for UWP projects, and many other enhancements.
PDFTron UWP SDK now supports building apps targeting ARM64 devices like the Microsoft Surface Pro, allowing apps to run natively on Windows 10 and leverage ARM architecture's advantages, including faster performance and better battery life.
Right now, you can build UWP applications targeting one of four platforms: x64, x86, ARM and ARM64.
Please see our get started guide to begin developing!
We’ve been working on getting the UWP SDK to support annotation syncing between different clients to allow collaboration through the use of a standardized XML, XFDF. This way, you can create amazing applications where multiple people can annotate on the same document, with all the required locking, change tracking, merging, and view updating handled internally.
The annotation manager can be used from Tools SDK as per the code snippet below
PDFDoc pDFDoc = new PDFDoc();
PDFViewCtrl pDFViewCtrl = new PDFViewCtrl();
pDFViewCtrl.SetDoc(pDFDoc);
ToolManager toolManager = new ToolManager(pDFViewCtrl);
// supply a permanent and unique userId here
AnnotManager annotManager = new AnnotManager(toolManager, "12345-67890-ABCD-EFGH");
// Subscribe to Local and Remote change events
annotManager.LocalChanged += AnnotManager_LocalChanged;
annotManager.RemoteChanged += AnnotManager_RemoteChanged;
Once local changes are made, calling RaiseLocalChange will notify all subscribers of LocalChanged events.
// Perform any changes to the document - add a new page
Page page = pDFDoc.PageCreate(new pdftron.PDF.Rect(0, 0, 600, 600));
pDFDoc.PagePushBack(page);
// Once a local change is performed to a document, call proper method to raise local change
annotManager.RaiseLocalChange(AnnotManager.AnnotationAction.ADD);
When an annotation change event is received from a remote service, add the following to notify the viewer about the change:
public void receivedRemoteChange(string xfdfCommand)
{
// Check if AnnotMananager has been initiated
if (toolManager.GetAnnotManager() != null)
{
// Raise remote change by passing the XFDF string
toolManager.GetAnnotManager().RaiseRemoteChange(xfdfCommand);
}
}
Additionally, we are excited to release a new C++ SDK dedicated for UWP projects that use Windows Runtime Components (C++/Cx) and must be published in the Microsoft Store. The new SDK makes sure to only call the Win32 and COM APIs allowed for UWP apps, so it can be approved by the Windows App Cert Kit.
You can adopt many different architectures for your application. Here's one example:
Like seen in the diagram above, the new SDK can be linked to a C++ static library that does not compile with /ZW (Consume Windows Runtime Extension), so the static library can be consumed by a library with /ZW enabled. This type of architecture is generally used when developing cross-platform applications sharing the same C++ libraries.
Refer to the our get started guide for more information on setting up a sample project.
On top of everything above, we've added several other nice new features with this update.
For the full list of changes, please see the PDFTron SDK 8.0.0 for UWP changelog. Don’t hesitate to contact us with any questions.
Robson Pontin
Share this post
PRODUCTS
Popular Content