PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | French EN
  • 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.
Versions 25 and later
iPhone/iPad The PDF Reader control is now available for iPhone/iPad applications.
Android The PDF Reader control is now available for Android applications.
New in version 25
iPhone/iPad The PDF Reader control is now available for iPhone/iPad applications.
Android The PDF Reader control is now available for Android applications.
iPhone/iPad The PDF Reader control is now available for iPhone/iPad applications.
Android The PDF Reader control is now available for Android applications.
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 PDF file
    PDF_MyDocument = sFileName
    If passwords are used:
    • AndroidiPhone/iPad It is not possible to open a protected PDF file.
  • Use PDFReaderOpen. For example:
    PDFReaderOpen(PDF_MyDocument, "C:\Users\test\Documents\file.pdf")
     
    IF ErrorOccurred() THEN
    Error(ErrorInfo())
    RETURN
    END
    Remark: 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 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 in a PDF file displayed in an Image control.
  • the number of pages found in a PDF file displayed in a PDF Reader control.
  • 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.
Versions 12 and later
Zoom
New in version 12
Zoom
Zoom
..Zoom allows you to find out and modify the zoom value used:
  • in an Image control.
  • in a Map control.
  • in an Organization Chart control.
  • in a Table, TreeView Table, Pivot Table, Spreadsheet or List Box control.
  • in a Word Processing control.
  • in a PDF Reader control.
  • in a window.
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 version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment