Steps to reproduce:
1. Load a PDF document with 0 pages
2. Enter some text in the search textbox and click the next/prev buttons
Expected: the search textbox should be either disabled or should ignore any search operation
Actual: an error occurs
Workaround:
Private Sub pdf_Viewer_DocumentLoaded(sender As Object, e As EventArgs)
If pdf_Viewer.Document.Pages.Count = 0 Then
pdf_Toolbar.SearchTextBox.Enabled = False
pdf_Toolbar.NextButton.Enabled = False
pdf_Toolbar.PreviousButton.Enabled = False
Else
pdf_Toolbar.SearchTextBox.Enabled = True
pdf_Toolbar.NextButton.Enabled = True
pdf_Toolbar.PreviousButton.Enabled = True
End If
End Sub
The attached file lorem-ipsum.pdf is rendered incorrectly in PdfViewer. I suspect it has something to do with kerning, because monospace font is not affected. Adobe Acrobat, Foxit PDF Reader, and Chrome render the file correctly.
The file was created with Pandoc, open source software, converting a markdown file (.md) to .pdf.