Renumber pages after delete in DocumentViewer

  • Last Post 13 January 2015
Ameny posted this 12 December 2014


I need some urgent help concerning renumbering pages in document viewer after deleting some pages of the document.

For exemple: I have a document of 4 pages (numbered from 1 to 4) from which i delete 2 pages: the second and the third page (page number 2 and page number 3 from document viewer). After the 2 pages are deleted from document viewer, I have the remaining 2 pages: the first and the fourth page. Those remaining pages, first and fourth, have the indices 1 and 4. I need to renumber the remaining pages as: "1", "2", instead of the actual result: "1", "4". You may notice this in the following screenshot:

alt text

To be more specific, from a code point of view, I'm using Visuals Controls, i load my document in document viewer attached to image viewer. Then i select some pages from my document viewer and delete them using : Synchronizer.DocumentViewer.FRDocument.Pages.DeleteAt (not the context menu of the control). In order to renumber the remaining pages (like in the example: "1" and "2" instead of "1" and "4") I try to use the method Synchronizer.DocumentViewer.FRDocument.Pages.Renumber(intsCollection); but at the end of this action the pages are not renumbered.

Please find bellow a code snipet of how I am trying to achieve this:

 //allPagesIndexList is  List<int> that stores all index pages from documentViewer 
    //delete selected pages

     foreach (int its in Synchronizer.DocumentViewer.SelectedPagesIndices)

    //Create new intsCollection and renumber   
      IntsCollection intsCollection = engineLoader.Engine.CreateIntsCollection();
      for (int i = 0; i < Synchronizer.Document.Pages.Count; i++)

I need to renumber pages without displaying Renumber Pages dialog box in Document Viewer, i need to do this automatically after the pages deletion, without any action from the user.

Can you help me please to resolve this issue? am i missing some instruction to order pages in document viewer?

Thanks in advance.

Attached Files

Anna Falevskaya posted this 13 January 2015

Dear Ameny,

Thank you for your question! Our developers have fixed the issue. The fix will be available in the next release of the FREngine 11.