Password Protected Visio files

Hi,

Is it possible to create and read password protected visio documents using Aspose.Diagram.dll for .net.

Thanks,

Dhivya

Hi Dhivya,

At the moment, Aspose.Diagram for .NET allows you to read, edit (add or remove shapes or connectors), protect or unprotect Visio documents but you need to use an existing file.

You cannot create Visio files from scratch but a request in this regard has been logged into our issue tracking system as DIAGRAM-25910. We will keep you updated on this issue in this thread.

Please feel free to contact us in case you have further comments or questions.

Best Regards,

Hi,

Please provide some sample code to read password protected Visio documents using Aspose.Diagram for .net in C#.

Thanks,

Dhivya

Hi Dhivya,

Protection is a bit different in Visio. There is an obscure non-password-protected way to protect your documents. You can protect individual shapes or document using ‘Drawing Explorer’ window in Visio.

Using Aspose.Tasks for .NET, you can read protected documents or protect/unprotect individual shapes as you can see in the following example.

Diagram diagram = new Diagram("Drawing1.vsd");
Page page0 = diagram.Pages[0];
Shape shape = page0.Shapes[0];
shape.Protection.LockAspect.Value = BOOL.True;
shape.Protection.LockBegin.Value = BOOL.True;
shape.Protection.LockCalcWH.Value = BOOL.True;
shape.Protection.LockCrop.Value = BOOL.True;
shape.Protection.LockCustProp.Value = BOOL.True;
shape.Protection.LockDelete.Value = BOOL.True;
shape.Protection.LockSelect.Value = BOOL.True;

You can also protect/unprotect documents using the following code.

diagram.DocumentSettings.ProtectBkgnds = BOOL.True;

diagram.DocumentSettings.ProtectMasters = BOOL.True;

diagram.DocumentSettings.ProtectShapes = BOOL.True;

diagram.DocumentSettings.ProtectStyles = BOOL.True;

Please feel free to contact us in case you have further comments or questions.

Best Regards,

The issues you have found earlier (filed as DIAGRAM-25910) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.