PDFViewCtrl: Adding items to the context menu

Hello,

we’re currently developing an in-house app which contains a PDFViewCtrl element. For pages being displayed in this Control, there is a context menu available, allowing operations like page rotation. It would be very convenient for us if there would be any possibility to

… display the context menu entries in German
… Add entries to this menu

Additionally, I have just seen that modifications made to pages are not being reflected in the thumbnails view. Is there anything that our app has to invoke in order to synchronize the thumbnails with the document itself?

Kind Regards

Axel

Hello, in order for us to best assist you with your questions, could you please let us know what platform you are developing for (ie. Windows/UWP, iOS, Android).

Hello Shakti,

we are developing a WinForms Application using C# / VS 2019.

Hello,

Thanks for your patience on this

Just a few questions:

  1. Are you using WinForms and .NET Framework 4.5.1+?
  2. Are you able to share a sample of how you are implementing it?

For your questions:

  1. display the context menu entries in German
    At the moment the built in menu is only in English and there is no easy way to translate it.

  2. Add entries to this menu
    Not with the built in menu but it can be done using the context menu like the example below:

One alternative is to add custom actions using the ContextMenu which can be prompted by right click of the mouse.

ContextMenu contextMenu = new ContextMenu();
PdfViewCtrl.ContextMenu = contextMenu;

MenuItem menuItemOperations = new MenuItem("Operations");
contextMenu.MenuItems.Add(menuItemOperations);

menuItemOperations.MenuItems.Add(new MenuItem("My menu item"));
menuItemOperations.MenuItems.Add(new MenuItem("My menu item 2"));
  1. Thumbnails

Right now the thumbnail image update will be triggered when there is a specific action in the Thumbnails View like “Enlarge” or “Reduce” which will cause a refresh of the images.

Hello,

please let me come back to this issue. We’re still looking for some way to have the thumbnails rebuilt after modifications to the document in the viewer. We have implemented pagewise rotation, deletion and moving of pages within the document and there’s the need to have the diplayed thumbnails updated after each such operation that changes the visual appearance of the document.

I have just tried to change the size of the thumbnail area to no avail. Even closing and re-opening the thumbnail sidebar won’t update then.

Is there any method we might invoke or could you implement somd method for us to provide this functionality?

Kind regards,

Axel

Hello Axel,

At the moment the built in Navigation View in the PDFViewCtrl does not have a call to force rendering for the thumbnails.
As I mentioned before only “Enlarge” and “Reduce” commands would issue a render request for the built in thumbnail view.

Have you tried the solution proposed by Ryan here: PDFViewCtrl: Drag and Drop for re-ordering of pages - #4 by Ryan

Thank you