PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Modifying the page displayed in an Image control
  • Modifying the page of the PDF file displayed in the report background
  • Number of pages found in a "multi-page" file
  • Drawing in an Image control associated with a "multi-page" image
  • Limits
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
..PageNumber is used to:
  • find out and modify the number of the page displayed in an Image control ("multi-page" image files)
  • find out and modify the page number of a PDF file displayed in an Image control of a window
  • find out and modify the page number of a PDF file displayed in report background.
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 23 and later
Note: To find out and modify the number of the page displayed in a Word Processing control or in a PDF Reader control, use ..NumberDisplayedPage.
New in version 23
Note: To find out and modify the number of the page displayed in a Word Processing control or in a PDF Reader control, use ..NumberDisplayedPage.
Note: To find out and modify the number of the page displayed in a Word Processing control or in a PDF Reader control, use ..NumberDisplayedPage.
Example
Windows Mobile
// Variables
i is int
// Modify the image file associated with the "IMG_MyImage" control in a window
IMG_MyImage = "MultipageFile.TIF"
// Display the different pages found in the image file successively
FOR i = 1 TO IMG_MyImage..NumberPage
IMG_MyImage..PageNumber = i
// Time-out for loading the images
Multitask(-100)
END
Syntax

Finding out the number of the displayed page Hide the details

<Page Number> = <Element name>..PageNumber
<Page Number>: Integer
  • Number of the page currently displayed in the specified Image control or in the background of the specified report.
  • 1 if the format of image file is not "multi-page" or if the first page of "multi-page" file is displayed.
  • 0 if the specified control or report is not associated with a supported image format.
<Element name>: Character string (with or without quotes)
Name of Image control or report to use.

Modifying the number of the displayed page Hide the details

<Element name>..PageNumber = <Page Number>
<Element name>: Character string (with or without quotes)
Name of Image control or report to use.
<Page Number>: Integer
Number of the page that will be displayed in the specified Image control or in the background of the specified report.
Remarks
Windows Mobile

Modifying the page displayed in an Image control

When an image file or a PDF file is associated with a control (from the window editor, via ..Image, ...), the image displayed by default corresponds to the first page of "multi-page" file.
To modify the page displayed in the Image control, all you have to do is use ..PageNumber.
Caution: ..PageNumber only applies to the image file currently associated with the Image control.

Modifying the page of the PDF file displayed in the report background

If a PDF file is used as report form, you have the ability to choose (in the report description) the page of the PDF file that will be displayed ("Background" tab, "# of PDF page" option). To modify the page displayed in the report background by programming, use ..PageNumber.
Caution: ..PageNumber only applies to the image file currently used as report form.
Windows Mobile

Number of pages found in a "multi-page" file

To find out the number of pages found in a "multi-page" image file, use ..NumberPage.
Windows Mobile

Drawing in an Image control associated with a "multi-page" image

If a drawing (performed by the drawing functions) is performed in the image control, this drawing will be automatically erased when the page is modified by ..PageNumber.
This drawing must be re-drawn whenever the page displayed in the image control is modified. To re-draw this drawing, we recommend that you use a procedure.

Limits

..PageNumber only applies to:
  • the image controls found in the windows.
  • the reports.
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