The below code that converts a PDF document to XOD using PDFNet nuget package (v6.8.56.6513) throws an exception. However, the previous version (v6.8.2.65223) of the nuget package works without any problem. To produce the issue, please download this file.
Platform: .Net Framework v4.7.2, x64.
`
using System;
using pdftron;
namespace PdfTronTest2
{
class Program
{
private static PDFNetLoader loader = PDFNetLoader.Instance();
static void Main(string[] args)
{
try
{
PDFNet.Initialize();
pdftron.PDF.Convert.ToXod("art of unit testing.pdf", "art of unit testing.xod");
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
}
}
`
Exception:
`
System.AccessViolationException
HResult=0x80004003
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=<Cannot evaluate the exception source>
StackTrace:
at trn.PDF.Convert.ToSilverlight(UString* , UString* , Obj* , Boolean )
at pdftron.PDF.Convert.ToXod(String in_filename, String out_filename)
at PdfTronTest2.Program.Main(String[] args) in C:\Users\mvinchhi\source\repos\PdfTronTest2\PdfTronTest2\Program.cs:line 15
`