Hi all.
We are trying to add a PageBreak in an existing PDF but when we use our license file we have an error, which do not exist when we do not set the license.
Here is the error :
Invalid index: index should be in the range [1…n] where n equals to the operators count.
Code is simple :
// instantiate Document instance
Document doc = new Document(@“C:\Temp\Test\Test_1f_Recto.pdf”);
// instantiate blank Document instance
Document dest = new Document();
// create PdfFileEditor object
PdfFileEditor fileEditor = new PdfFileEditor();
fileEditor.AddPageBreak(doc, dest, new PdfFileEditor.PageBreak[]
{
new PdfFileEditor.PageBreak(1, 1)
});
// save resultant file
dest.Save(@“C:\Temp\Test\Test_1f_Recto_PageBreak.pdf”);
Error appear at the line which add the PageBreak.
Thanks for your help !