System.ArgumentOutOfRangeException was unhandled
HResult=-2146233086
Message=Value of '1064' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'.
Parameter name: Value
Source=System.Windows.Forms
ParamName=Value
StackTrace:
at System.Windows.Forms.ScrollProperties.set_Value(Int32 value)
at Spire.PdfViewer.Forms.PdfDocumentViewer.ProcessCmdKey(Message& msg, Keys keyData)
1064 for page down and -1064 for page up.
If anybody else has this issue, I have a simple workaround. You can create your own control inherited from PdfDocumentViewer and overwrite ProcessCmdKey() with the following code in your new class:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == System.Windows.Forms.Keys.PageUp)
{
GoToPreviousPage();
return true;
}
if (keyData == System.Windows.Forms.Keys.PageDown)
{
GoToNextPage();
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}