0
1

Hello,

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)
       {
            Synchronizer.DocumentViewer.FRDocument.Pages.DeleteAt(allPagesIndexList.IndexOf(its));
            allPagesIndexList.Remove(its);
       }
        allPagesIndexList.Clear();

    //Create new intsCollection and renumber   
      IntsCollection intsCollection = engineLoader.Engine.CreateIntsCollection();
      for (int i = 0; i < Synchronizer.Document.Pages.Count; i++)
        {
             allPagesIndexList.Add(i);
             intsCollection.Add(i);
        }
      Synchronizer.DocumentViewer.FRDocument.Pages.Renumber(intsCollection);

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.

asked 12 Dec '14, 16:45

Ameny's gravatar image

Ameny
112

edited 15 Dec '14, 12:24


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.

link

answered 13 Jan '15, 17:37

Anna%20Falevskaya's gravatar image

Anna Falevskaya ♦♦
715

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1

Asked: 12 Dec '14, 16:45

Seen: 601 times

Last updated: 13 Jan '15, 17:37

Related questions

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal