Working on an initial plugin for Autodesk Navisworks using WPF and I am trying to load a PDF file to that viewer window. I use PDFium package, installed it as instructed in patagames website with NuGet in VS2022.
This is how my control looks like:
public partial class MyControl : UserControl
{
public MyControl()
{
InitializeComponent();
PdfCommon.Initialize();
}
}
And this is how my plugin file looks like:
namespace My_Plugin
{
// assign Plugin Name, devID, Tooltip
[Plugin("MyPlugin", "ADSK", ToolTip = "MyPlugin", DisplayName = "MyPlugin")]
[DockPanePlugin(350, 500, FixedSize = false)]
public class MyPlugin : DockPanePlugin
{
public override Control CreateControlPane()
{
// WindowForm control to host WPF elem
ElementHost elemHost = new ElementHost
{
//assign wpfcontrol
AutoSize = true,
Child = new MyControl()
};
//create control
elemHost.CreateControl();
return elemHost;
}
public override void DestroyControlPane(Control pane)
{
pane.Dispose();
}
}
}
Running the project yields this error:
Could not load file or assembly 'Patagames.Pdf, Version=11.76.43.48, Culture=neutral, PublicKeyToken=60fd6cf9b15941cf' or one of its dependencies. The system cannot find the file specified.
Any suggestions what am I doing wrong?