Expected Behavior:
1. Delete a page.
2. The Navigation Toolbar updates the number of pages.
Actual Behavior:
1. Delete a page.
2. The Navigation Toolbar does not update.
3. Mouse over the Navigation Toolbar.
4. The Navigation Toolbar updates the number of pages.
How do we update the navigation toolbar without having to move the mouse in to it?
We currently delete a page from a PDF document with this C# code:
Code: Select all
public void DeletePages(int documentId, int startIndex, int endIndex) {
try {
var rangeText = BuildPageRangeText(startIndex, endIndex);
_viewer.SetProperty("Operations.DeletePages.RangeType", "Exact");
_viewer.SetProperty("Operations.DeletePages.RangeText", rangeText);
_viewer.DoDocumentVerb(documentId, null, "DeletePages", null, out _, (int) PXCVA_Flags.PXCVA_NoUI);
SaveDocument(documentId);
}
catch (COMException ex) {
_viewer.GetTextFromResult(ex.HResult, out var message);
throw new Exception(message, ex);
}
}
// saves the document in place
public void SaveDocument(int documentId) {
// saves the document in place
_viewer.SaveDocument(documentId, null, 0, 0);
// Set the document's modified property to false, to remove the (*) from its tab.
_viewer.SetDocumentProperty(documentId, "Modified", 0);
}