en:pdf_adaptor [TAST DokuWiki ]

User Tools

Site Tools


Sidebar

First steps in TAST

What is UML

Computer setup for TAST use

FAQ

Recognized Issues

TAST tool Menu

TAST Adaptors

Adaptors examples

TAST Integrations

Interesting features

Documentation of technical administration

Modeling recommendations

Training in the TAST tool

en:pdf_adaptor

This is an old revision of the document!


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.

Initilization 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:
  1. When Occurrences is “empty”, it will check that the string exists, no matter the number of times.
  2. When Occurrences is different to “0”, it will check that the Search String exists the indicated number of times.
  3. 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.
en/pdf_adaptor.1567678912.txt.gz · Last modified: 2019/09/05 10:21 by tast