PDFTron PDF to XOD conversion throws exception System.AccessViolationException

0

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
c#
pdftron
pdfnet
asked on Stack Overflow Jan 23, 2020 by Mihir

1 Answer

0

Thank you again for the detailed report.

The issue has been fixed, and our production channel has been patched. You will be able to download a patched production build starting tomorrow, from our nightly build site.

I see you posted to our forum, so I will provide you more details there on when and where to get the download.

answered on Stack Overflow Jan 23, 2020 by Ryan

User contributions licensed under CC BY-SA 3.0