This shows you the differences between two versions of the page.
en:pdf_adaptor [2019/10/01 14:18] tast [Initilization Parameters] |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PDF Adaptor ====== | ||
- | PDF adaptor allow you to interact with a .pdf file, so that you can check if it has been generated properly and contains the information it is supossed to. It will be useful for you to test all those procesess where the generation of a .pdf file is implied. | ||
- | |||
- | ===== Initialization Parameters ===== | ||
- | |||
- | * **FilePath:** complete path of the file | ||
- | |||
- | ===== Predefined Functions (PF): ===== | ||
- | |||
- | |||
- | * **getNumPages()**: Returns the number of pages in the document. | ||
- | |||
- | * **getNumWhitePages()**: Returns the number of white pages in the document. | ||
- | |||
- | * **checkTextOnDocument(Page Area, Search Text)**: Looks for a given text on a specific area of the document (whole Page, Header, Body, Footer). This function looks for an exact match of the search text. | ||
- | |||
- | * **checkTextInSlide(Page, Occurrences, Search Text, ExactSearch)**: Looks for a given text on a specific Page of the document. Checks if it is present the number of times expressed in "Occurences" and returns "true" or "false" accordingly. "Exact Search" allows you to tell the function if you are looking for an exact match or if the number of spaces between each part of the Search String is variable.\\ \\ **IMPORTANT**: Please be aware of the "Occurrences" behaviour: | ||
- | - When Occurrences is "empty", it will check that the string exists, no matter the number of times. | ||
- | - When Occurrences is different to "0", it will check that the Search String exists the indicated number of times. | ||
- | - When Occurrences is "0", it will check that the Search String does not exist, returning "true" if so, "false" if it is found any number of times. | ||
- | |||
- | * **getTextCountOnPage(Page, Search Text, Page Area)**: Counts the number of times the Search Text is present on a specific area (Page, Header, Body, Footer) of a given page. The function looks for exact matches of the given Search Text. | ||
- | |||
- | * **getTextCountOnDocument(Search Text)**: Counts the number of times the Search Text is present on the document. | ||
- | |||
- | * **isPageWhite(Page)**: Returns “true” if the specified page is white, “false” otherwise. | ||