User Tools

Site Tools


pdf_adaptor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pdf_adaptor [2019/11/07 15:54]
montse created
pdf_adaptor [2024/12/10 13:03] (current)
montse [Predefined Functions]
Line 1: Line 1:
-====== ​Host Adaptor ​3270 ======+====== ​PDF Adaptor ====== 
 +=====Introduction ===== 
 +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 supposed to. It will be useful for you to test all those processes where the generation of a .pdf file is implied.
  
 +===== Initialization Parameters =====
  
 +  * **FilePath:​** complete path of the file
  
-===== Introduction ​=====+===== Predefined functions ​=====
  
-This adapter is used to run tests on the Host Adapter 3270. This Adapter is currently under construction,​ so the information on it is still under construction. Therefore, the information will be updated as the development progresses. 
  
-===== Configuration =====+  * **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.
  
-In the initialization process, it is necessary to supply ​the information to connect to the Host 3270 server. That is the information of the Adapter object.+  * **checkTextOnPage**:​ returns trueif it finds the text specified by the Search Text parameter, in the area indicated by the PageArea parameter, on the page represented by the Page parameter, the number of times entered in Ocurrences, false otherwise.
  
 +  * **checkTextOnPageArea(Page,​ CoordinateX,​ CoordinateY,​ Width, Height, Text):** this function return true if the parameter text exists inside the page area defined by the parameters. Page parameter indicates the page number to transform. Coordinate X parameter, indicates the position x where the area starts. Coordinate Y parameter, indicates the position y where the area starts. Width and height parameters indicates the area and the text parameter, it’s the text to check on the defined area. The measure unit is 72 dpi.
  
-===== Initialization Parameters =====+  * **generateFileAsEvidence**:​ the function generates a copy of the PDF file in its current state to be added as evidence. 
 + 
 +  * **getCustomMetaData**:​ returns the value of the custom metadata specified in its input parameter. Custom metadata is different from the automatic metadata that is manually included in documents. The metadata name is case sensitive. 
 + 
 +  * **getDataSigned**:​ gets the signature data of the document in case it is digitally signed. Returns in output a variable TastTableData. The data is returned in one row and N columns. 
 + 
 +  * **getMetaData**:​ returns the value of the metadata selected in the dropdown of the input parameter. These are the automatic metadata such as: title, author, subject, keyWords, creator, producer, pageCount, creationDate,​ modificationDate,​ traped. 
 + 
 +  * **getNumPages()**:​ returns the number of pages in the document. 
 + 
 +  * **getNumRows**:​ 
 + 
 +  * **getNumWhitePages()**:​ returns the number of white pages in the document. 
 + 
 +  * **getPageAsImage(Page,​File):​** this function transform a PDF Page into a jpg image file with a resolution of 72 dpi. About the input parameters, the Page parameter indicates the page number to transform, The File parameter indicates the path and the file name where the image will be generated. The file extension is .jpg.\\ The purpose of this image is to allow the user to load it into any application that helps him to identify the coordinates where a piece of text appears.\\ Besides that, if Get Evidences is checked, the function generates the image file in the log directory as the step evidence.
  
-=====Connection=====+  * **getPageText:​** allows you to retrieve the text contained in a page of a PDF, and the function generates as evidence a file with the retrieved text.
  
-  * **Host:** Name of the machine or IP address. Required. SESSION_HOST +  * **getTextCountOnDocument(Search Text)**: counts ​the number ​of times the Search Text is present on the document.
-  * **Port:** Connection port. Required.SESSION_HOST_POST. +
-  * **LU_Name:​** Name of the connection LU, optional. ​  +
-  * **Enhanced:​** Indicates whether the Enhanced protocol is used. (by default is not checked). SESSION_TN_ENHANCED.  +
-  ​* **Telnet_Negotiated:** The telnet information.  +
-  * **Server_Authentication:​** Information of authentication to the 3270 Server.  +
-  * **Client_Certificate_Autentication:​** Certificate for Authentication. +
-  * **Personal_Certificate:​** Personal certificate for Authentication. +
-  * **Personal_Certificate_File Path:** Path to the Certificate for Authentication. +
-  * **Personal_Certificate_pass:​** Pass to the Certificate for Authentication. +
-  * **Certificate_Name:​** Name of the Certificate. +
-  * **Certificate_Pass:​** Pass to the Certificate. +
-  * **Certificate_Source:​** Source to the Certificate. +
-  * **Certificate_URL:​** Url to Certificate. +
-  * **Prompt_Required:​** PromptRequired. +
-  * **Certificate_Based_Keys:​** Certificate Based Keys. +
-  * **SSL:** SSL.  +
-  * **KeyStore_FilePath:​** KeyStore File Path.  +
-  * **P12_FilePath:​** P12 File Path.  +
-  * **KeyStore_Pass:​** KeyStore Pass.  +
-  * **Certificate_Trusted:​** Certificate for Authentication. +
-  * **Code_Page:​** Code Page.   +
-  * **Session_Type:​** Session Type. +
-  * **Security_Type:​** Security Type. +
-  * **Protocol:​** Protocol. +
-  * **Protocol_Version:​** Protocol Version. +
-  * **Certificate_Type:​** Certificate Type.+
  
 +  * **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.
  
 +  * **getTextPageByArea(Page,​ CoordinateX,​ CoordinateY,​ Width, Height):** this function extract and return the text that its contained inside the page area defined by the parameters. Page parameter indicates the page number to transform. Coordinate X parameter, indicates the position x where the area starts. Coordinate Y parameter, indicates the position y where the area starts. Width and height parameters indicates the area. The measure unit is 72 dpi.
  
 +  * **isPageWhite(Page)**:​ returns “true” if the specified page is white, “false” otherwise.
  
 +  * **isSigned**:​ returns in its boolean output variable, **true** or **false**, depending on whether the document is digitally signed or not.
  
-  +  * **readPdfFile**:​ reads a PDF file and loads it for processing.
-===== Predefined Functions =====+
  
  
-  * **connect3270:​** Allows you to connect to the 3270. (It is not necessary to create the message, the Adapter executes the connection in its creation). ​ 
-  * **disconnect3270:​** Allows you to disconnect to the 3270.  
-  * **play:** Plays the navigation 7 execution into the 3270 Host. It’s necessary to record the navigation previously. 
-  * **rec:** Records the navigation 7 execution into the 3270 Host. 
-  
-  ​ 
  
  
pdf_adaptor.1573142052.txt.gz · Last modified: 2019/11/07 15:54 by montse