Simple PDF Reader

in #utopian-io7 years ago (edited)

Simple PDF reader is a desktop application to viewing and printing on PDF documents. It's only PDF viewer to open and interact with all types of pdf content. This application is very simple and easy to use, small and fast. I have this application can make contribution to small pdf viewer, in the future this application will probably adding some features. or you can make contribution to this projects.

Prototype


This application have three main component:

  • Header: header is main window, in the header have a logo, title and 3 button for minimize, maximize and close the application.
  • Toolbars: in this section consists of toolbar to open and manage pdf document.
  • Entire area: Entire area to viewing content of pdf document.

How to install?

To install this project have a requirements:

Screenshot



Codes

And here is some screenshot of code:
Open file and set pdf document default zoom
This code defined to get and open pdf document and show to the entire area. And set default zoom to 75% and view to first page of pdf document.

    Private Sub btnOpenFile_Click(sender As Object, e As EventArgs) Handles btnOpenFile.Click
        ofdFile.Filter = "PDF File (*.pdf)|*.pdf"
        ofdFile.Multiselect = False
        ofdFile.FileName = ""
        ofdFile.ShowDialog()
        lblTitle.Text = ofdFile.SafeFileName + " - Simple PDF Reader"
        cboSize.Enabled = True
        btnPrint.Enabled = True
        txtPage.Text = 1
    End Sub
    Private Sub ofdFile_FileOk(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles ofdFile.FileOk
        AxAcroPDF1.src = ofdFile.FileName
        AxAcroPDF1.setZoom(75)
        cboSize.SelectedIndex = 3
    End Sub

Toolbars codes
This codes defined some toolbar function to zoom in and zoom out pdf document and goto previous or next page. And code to print the pdf document.

    Private Sub btnPrint_Click(sender As Object, e As EventArgs) Handles btnPrint.Click
        AxAcroPDF1.printWithDialog()
    End Sub
    Private Sub txtPage_TextChanged(sender As Object, e As EventArgs) Handles txtPage.TextChanged
        If txtPage.Text < 0 Then
            txtPage.Text = 1
        End If
        AxAcroPDF1.setCurrentPage(txtPage.Text)
    End Sub
    Private Sub btnPreviousPage_Click(sender As Object, e As EventArgs) Handles btnPreviousPage.Click
        AxAcroPDF1.gotoPreviousPage()
    End Sub
    Private Sub btnNextPage_Click(sender As Object, e As EventArgs) Handles btnNextPage.Click
        AxAcroPDF1.gotoNextPage()
    End Sub
    Private Sub btnSizeMinus_Click(sender As Object, e As EventArgs) Handles btnSizeMinus.Click
        Dim size As Int16 = Replace(cboSize.SelectedItem, "%", "") - 20
        If size < 1 Then
            size = 10
        End If
        AxAcroPDF1.setZoom(size)
    End Sub
    Private Sub btnSizePlus_Click(sender As Object, e As EventArgs) Handles btnSizePlus.Click
        Dim size As Int16 = Replace(cboSize.SelectedItem, "%", "") + 20
        If size < 1 Then
            size = 10
        End If
        AxAcroPDF1.setZoom(size)
    End Sub

Thank you



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Ok. thank you.
next time I'll do better

Thank you for sharing this discussion here. I am searching for the pdf ocr tool for my assignment. If anyone of you has any idea where I can find this ocr tool then please help me to find these services.

This is very useful information for anyone who constantly uses PDF files. In my turn, I want to share with you the article https://thefrisky.com/unleashing-the-power-of-pdfs/ where you will find information that will be useful to you. You may even be able to learn something new for yourself and expand the possibilities of using PDF files for your purposes.