Summary

Home

Methods
Home

Here is the list of methods specific to OrdoPDFReader


Cls Method

Clears the display area of the control and closes the current PDF document

Syntax

object. Cls

The syntax for the Cls method has these parts:

Element Description
Object The object placeholder represents an OrdoPDFReader control

CopyPageToClipboard Method

Copies the image of the page being viewed to the clipboard

Syntax

Bool = object. CopyPageToClipboard()

The CopyPageToClipboard method syntax has these parts:

Element Description
Object The object placeholder represents an OrdoPDFReader control
Bool Boolean, True if an image has been copied, otherwise False

FitControl Method

Adapts the displayed page to the size of the control

Syntax

object. FitControl

The FitControl method syntax has these parts:

Element Description
Object The object placeholder represents an OrdoPDFReader control

GetPagesCount Method

Returns the number of pages in the document.

Syntax

number = object. GetPageCount

The FitControl method syntax has these parts:

Element Description
Object The object placeholder represents an OrdoPDFReader control
number Integer, contains the number of pages in the document

GetPDFText Method

Returns a string containing the text of the PDF file, if it exists.

Syntax

String = object. GetPDFText

The GetPDFText method syntax has these parts:

Element Description
Object The object placeholder represents an OrdoPDFReader control
String String, textual content of the document

Remarks

  • If the PDF file consists only of images (after using a scanner, for example), the function returns an empty string.

Load Method

Loads a PDF file into the control and optionally displays it

Syntax

Boolean = object. Load( FileName,[ShowPDF])

The Load method syntax has these parts:

Element Description
Object The object placeholder represents an OrdoPDFReader control
Filename String, Path and full name of the PDF document to load
ShowPDF Boolean, optional. If True displays the first page of the document in the control, True is default value
Boolean True if the document has been uploaded, otherwise False

Remarks

  • If the file does not exist, is not in PDF format, or if it is corrupted, the function returns False, but does not display an error. If successful, the function returns True
  • The ShowPDF variable is optional, by default to True
  • If ShowPDF = False, the document is loaded into the control, but not displayed. To display it, use the ShowPDF method
  • To extract the text content from a PDF file, use the Load method with ShowPDF=False, then the GetPDFText method, and finally the Cls method to close the document

MakeOCROnFile Method

Loads a PDF document and performs character recognition on the document, if OCR is installed.

Syntax

String = object. MakeOCROnFile( [FileName])

The MakeOCROnFile method syntax has these parts:

Element Description
Object The object placeholder represents an OrdoPDFReader control
Filename String, Path and full name of the PDF document to load
String String, OCR text performed on the document

Remarks

  • If FileName does not exist, returns a live string
  • if OrdoOCR is not installed, displays an error message and returns an empty string

PrintPDF Method

Prints all or part of the open PDF document

Syntax

object. PrintPDF( [Copies],[Orientation],[FromPage],[ToPage],[PrinterName],[PrinterQuality])

The PrintPDF method syntax has these parts:

Element Description
Object The object placeholder represents an OrdoPDFReader control
Copies Integer, optional. Number of copies of the document to be printed. If omitted is set to 1
Orientation oPrinterOrientation, optional. Print orientation. If omitted is set to oAuto
FromPage Integer,optional. The number of the first page to print. If omitted is set to 1
ToPage Integer,optional. The number of the last page to print. If omitted is set to the number of pages in the document
PrinterName String, Name of the printer on which to print the document. If omitted prints to the default printer
PrinterQuality oPrinterQuality:
[opqDraft] = 72 dpi
[opqLow] = 150 dpi
[opqStandard] = 300 dpi
[opqHigh] = 600 dpi
[opqMax] = 1200 dpi
The default value is [opqStandard] = 300 dpi

Remarks

  • oPrinterOrientation can take the following values:
    • oAuto = 0: the orientation of the page to be printed is calculated automatically by the OrdoPDFReader component
    • oPortrait = 1: Portrait Orientation
    • oLandscape = 2: Landscape orientation
  • The default system printer is not changed when printing.

SelectPDFFile Method

Displays a file picker, loads the PDF document chosen by the user, and optionally displays it

Syntax

String = object. SelectPDFFile( [PDFPath],[ShowPDF])

The syntax for the SelectPDFFile method has these parts:

Element Description
Object The object placeholder represents an OrdoPDFReader control
PDFPath Character string, initial path of file picker, optional
ShowPDF Boolean, optional. If True displays the first page of the document in the control
String String, path and filename of the loaded document, otherwise empty string

Remarks

  • If PDFPath is an empty string or is omitted, the file picker opens in the user's "Documents" folder
  • The ShowPDF variable is optional, by default to True
  • If ShowPDF = False, the document is loaded into the control, but not displayed. To display it use the ShowPDF method

SelectPDFFileForOCR Method

Displays a file picker, loads the PDF document chosen by the user, and performs character recognition on the document, if OrdoOCR is installed.

Syntax

String = object. SelectPDFFileForOCR( [PDFPath])

The syntax for the SelectPDFFileForOCR method has these parts:

Element Description
Object The object placeholder represents an OrdoPDFReader control
PDFPath Character string, initial path of file picker, optional
String String, OCR text performed on the document

Remarks

  • If PDFPath is an empty string or is omitted, the file picker opens in the user's "Documents" folder
  • if OrdoOCR is not installed, displays an error message and returns an empty string

ShowPDF Method

Displays or redisplays the current page of the loaded document

Syntax

object. ShowPDF

The ShowPDF method syntax has these parts:

Element Description
Object The object placeholder represents an OrdoPDFReader control