PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
New WINDEV 23 feature!
  • Overview
  • Handling the PDF Reader control by programming
  • Initializing a PDF Reader control
  • Printing the content of a PDF Reader control
  • Properties specific to the PDF Reader control
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
A PDF Reader control can be handled by programming.
To handle a PDF Reader control by programming, WINDEV proposes the functions for managing the PDF Reader control.
This help page explains how to handle a PDF Reader control by programming.
Handling the PDF Reader control by programming

Initializing a PDF Reader control

To display a PDF file in a PDF Reader control, you can:
  • Define the initial document ("General" tab in the description window of control).
  • Assign the PDF Reader control with the PDF file. For example:
    // Selects a .pdf file in the current directory
    sFileName is string
    sFileName = fSelect("", "Presentation.pdf", ...
    "Selection of PDF files", ...
    "Pdf file (*.pdf)" + TAB + "*.pdf", "*.pdf", fselOpen)

    IF sFileName ~="" THEN
    // No selected file
    RETURN
    END

    // Load the docx file
    PDF_MyDocument = sFileName
    Caution: If a password is used to protect the file in opening, a window will be displayed to type the password.
  • Use PDFReaderOpen. For example:
    PDFReaderOpen(PDF_MyDocument, "C:\Users\test\Documents\file.pdf")

    IF ErrorOccurred() THEN
    Error(ErrorInfo())
    RETURN
    END
    Note: PDFReaderOpen allows you to give the file password by programming.

Printing the content of a PDF Reader control

To print the content of a PDF Reader control, all you have to do is use iPrintPDF. For example:
iPrintPDF(PDF_MyPDFReader)

Properties specific to the PDF Reader control

The following properties are specific to the PDF Reader control. They are mainly used to handle the control characteristics:
Versions 23 and later
DisplayMode
New in version 23
DisplayMode
DisplayMode
..DisplayMode is used to find out and modify the display mode in a Word Processing control or PDF Reader control.
Versions 23 and later
DisplayModeAutoWhenLoading
DisplayModeAutoWhenLoading
..DisplayModeAutoWhenLoading is used to find out and modify the behavior of display mode when loading a PDF document.
Versions 23 and later
FilePath
New in version 23
FilePath
FilePath
..FilePath is used to find out:
  • the name of xlsx file associated with a Spreadsheet control. This name is initialized by SpreadsheetLoad and SpreadsheetSave.
  • the name of file associated with an Image Editor control. This name is initialized by PicOpen and PicSave.
  • the name of PDF file associated with a PDF Reader control. This name is initialized by PDFReaderOpen.
  • the name of DOCX file associated with a Word Processing control. This name is initialized by DocOpen and DocSave.
Versions 23 and later
NavigationPaneVisible
New in version 23
NavigationPaneVisible
NavigationPaneVisible
..NavigationPaneVisible is used to manage the display of thumbnail pane in the PDF Reader control.
Versions 23 and later
NumberAccessiblePages
New in version 23
NumberAccessiblePages
NumberAccessiblePages
..NumberAccessiblePages is used to find out the number of pages currently loaded in the PDF Reader control or in the Word Processing control.
Versions 23 and later
NumberDisplayedPage
New in version 23
NumberDisplayedPage
NumberDisplayedPage
..NumberDisplayedPage is used to find out and modify the number of the page currently displayed in the PDF Reader control or in the Word Processing control.
Versions 09 and later
NumberPage
New in version 09
NumberPage
NumberPage
..NumberPage is used to find out:
  • the number of pages found in a "multi-page" image file. This image is displayed in an Image control or in the background of a Chart control.
  • the number of pages found in a PDF file displayed in an Image control.
  • Versions 23 and later
    WINDEV the number of pages found in a PDF file displayed in a PDF Reader control.
    New in version 23
    WINDEV the number of pages found in a PDF file displayed in a PDF Reader control.
    WINDEV the number of pages found in a PDF file displayed in a PDF Reader control.
  • Versions 23 and later
    WINDEV the number of pages found in a DOCX file displayed in a Word Processing control.
    New in version 23
    WINDEV the number of pages found in a DOCX file displayed in a Word Processing control.
    WINDEV the number of pages found in a DOCX file displayed in a Word Processing control.
Versions 23 and later
UseMode
New in version 23
UseMode
UseMode
..UseMode allows you to find out and modify the mode for using the PDF Reader control with the mouse. The mouse is used to select text in the document or to move within the document pages.
To find out the entire list of WLanguage properties that can be used with a PDF Reader control, see Properties associated with the PDF Reader control.
Minimum required version
  • Version 23
Comments
Click [Add] to post a comment