PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
  • Modifying the displayed page
  • Case of PDF and DOCX files with a huge number of pages
  • Limit
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
The Property NumberPage makes it possible to know:
  • WINDEVWindows Mobile 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.
  • WINDEVWindows MobileAndroidiPhone/iPad the number of pages found in a PDF file displayed in an Image control.
  • Versions 23 and later
    WINDEVAndroidiPhone/iPad the number of pages found in a PDF file displayed in a PDF Reader control.
    New in version 23
    WINDEVAndroidiPhone/iPad the number of pages found in a PDF file displayed in a PDF Reader control.
    WINDEVAndroidiPhone/iPad 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.
Reminder: Some image formats (TIFF for example) can contain several images in the same file. Each image corresponds to a file page. These formats are called "multi-page" formats.
Versions 25 and later
Android This property is now available for Image and PDF Reader controls that display a PDF file in Android applications.
iPhone/iPad This property is now available for Image and PDF Reader controls that display a PDF file in iPhone/iPad applications.
New in version 25
Android This property is now available for Image and PDF Reader controls that display a PDF file in Android applications.
iPhone/iPad This property is now available for Image and PDF Reader controls that display a PDF file in iPhone/iPad applications.
Android This property is now available for Image and PDF Reader controls that display a PDF file in Android applications.
iPhone/iPad This property is now available for Image and PDF Reader controls that display a PDF file in iPhone/iPad applications.
Example
WINDEV
// Modify the image file associated with the "IMG_MyImage" control
IMG_MyImage.Image = "MultipageFile.TIF"
// Successively display the different pages found in the image file
FOR I = 1 TO IMG_MyImage.NumberPage
IMG_MyImage.PageNumber = I
// Time-out for loading images
Multitask(-100)
END
WINDEVAndroidiPhone/iPad
// Display page 23 in the PDF Reader control
IF PDF_MyPDFReader.NumberPage>23 THEN
PDF_MyPDFReader.NumberDisplayedPage = 23
END
Syntax
<Number of Pages> = <Control used>.NumberPage
<Number of Pages>: Integer
  • Number of pages found in the file associated with the specified control.
  • 1 if the format of image file is not "multi-page" or if the "multi-page" format contains a single page.
  • 0 if the specified control is not associated with an image format supported by WINDEV.
<Control used>: Control name
Name of control to use:
  • WINDEVWindows MobileAndroidiPhone/iPad Name of Image control,
  • WINDEVWindows Mobile Name of Chart control,
  • Versions 23 and later
    WINDEVAndroidiPhone/iPad Name of PDF Reader control.
    New in version 23
    WINDEVAndroidiPhone/iPad Name of PDF Reader control.
    WINDEVAndroidiPhone/iPad Name of PDF Reader control.
  • Versions 23 and later
    WINDEV Name of Word Processing control.
    New in version 23
    WINDEV Name of Word Processing control.
    WINDEV Name of Word Processing control.
Remarks

Modifying the displayed page

To modify the displayed page:
  • For the Image controls and the Chart controls, use PageNumber.
  • Versions 23 and later
    For the PDF Reader controls and the Word Processing controls, use NumberDisplayedPage.
    New in version 23
    For the PDF Reader controls and the Word Processing controls, use NumberDisplayedPage.
    For the PDF Reader controls and the Word Processing controls, use NumberDisplayedPage.
Versions 23 and later
WINDEV

Case of PDF and DOCX files with a huge number of pages

If the PDF or DOCX file opened in the control contains a huge number of pages, the control loads each page successively: some pages are not immediately accessible.
In this case:
  • the Property NumberPage is blocked: it waits for the end of file load. The application is locked.
  • NumberAccessiblePages returns the number of PDF pages currently loaded without having to wait for the end of load.
  • NumberDisplayedPage returns the number of the page currently displayed in the control (more than 50% of the page is displayed in the control).
New in version 23
WINDEV

Case of PDF and DOCX files with a huge number of pages

If the PDF or DOCX file opened in the control contains a huge number of pages, the control loads each page successively: some pages are not immediately accessible.
In this case:
  • the Property NumberPage is blocked: it waits for the end of file load. The application is locked.
  • NumberAccessiblePages returns the number of PDF pages currently loaded without having to wait for the end of load.
  • NumberDisplayedPage returns the number of the page currently displayed in the control (more than 50% of the page is displayed in the control).
WINDEV

Case of PDF and DOCX files with a huge number of pages

If the PDF or DOCX file opened in the control contains a huge number of pages, the control loads each page successively: some pages are not immediately accessible.
In this case:
  • the Property NumberPage is blocked: it waits for the end of file load. The application is locked.
  • NumberAccessiblePages returns the number of PDF pages currently loaded without having to wait for the end of load.
  • NumberDisplayedPage returns the number of the page currently displayed in the control (more than 50% of the page is displayed in the control).

Limit

The Property NumberPage applies only to:
  • WINDEVWindows MobileAndroidiPhone/iPad Image controls in windows,
  • WINDEVWindows Mobile the Chart controls found in the windows,
  • Versions 23 and later
    WINDEVAndroidiPhone/iPad the PDF Reader controls.
    New in version 23
    WINDEVAndroidiPhone/iPad the PDF Reader controls.
    WINDEVAndroidiPhone/iPad the PDF Reader controls.
  • Versions 23 and later
    WINDEV the Word Processing controls.
    New in version 23
    WINDEV the Word Processing controls.
    WINDEV the Word Processing controls.
Related Examples:
The Image control (display a PDF or a TIFF) Unit examples (WINDEV): The Image control (display a PDF or a TIFF)
[ + ] Displaying a PDF or TIFF document in the Image control found in a window.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment