Exception by using pdftron.PDF..PDfDoc.SetPageLabel


i have a question about the method "pdftron.PDF.PageLabel.Create". I use the following code to extract pages from my current document in a new document.

using (var newDoc = new pdftron.PDF.PDFDoc())
                        newDoc.InsertPages(0, _document, minPage, maxPage, pdftron.PDF.PDFDoc.InsertFlag.e_insert_bookmark);

                        var index = minPage - 1;

                        for (int i = minPage; i <= maxPage; i++)
                            var pos = i - index;

                            var currentLabel = _document.GetPageLabel(i);

                            if (!currentLabel.IsValid()) continue;

                            var newPageLabel = pdftron.PDF.PageLabel.Create(newDoc, currentLabel.GetStyle(), currentLabel.GetPrefix(), currentLabel.GetStart());

                            //newDoc.SetPageLabel(pos, newPageLabel);

                        newDoc.Save(tempPath, pdftron.SDF.SDFDoc.SaveOptions.e_linearized);
You see that i recreate the pageLabels from my current document for my new document. When i use the code line

newDoc.SetPageLabel(pos, newPageLabel);

Then the process seems to be not do free the document because when i try to move the the file with

System.IO.File.Move(tempPath, proposeLocalFilePath);

The i get an exception. When SetPage() is comment out then i get no exception. So SetPageLabel seems not work correctly.

Best regards

Can you please try the latest version of PDFNet, and see if that corrects the issue.
Release channel: http://www.pdftron.com/nightly/?p=stable/2017-03-28/
Latest official builds, and Release channel, are ready for production usage, however the developer channel builds do not get the same amount of testing and can be in a state of change.