Spire.PDFViewer is a powerful PDF Viewer component for .NET. It allows developers to load PDF document from stream, file and byte array.

Sat Aug 08, 2015 6:15 pm

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);
}

Stocklone
 
Posts: 1
Joined: Fri Aug 07, 2015 10:44 pm

Mon Aug 10, 2015 3:33 am

Hello,

Thanks for your sharing.
Glad to hear that the issue has been solved.
Please feel free to contact us if you have any questions.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Return to Spire.PDFViewer

cron