Article - Working with PDF documents

Skip to end of metadata
Go to start of metadata

Table of Contents

Overview

Squish does not offer direct support for working with PDF files themselves. However, several options are available, for example for checking how a PDF is being shown on the screen or for extracting the text contents of it.

Comparing PDF documents

The following workflows may be possible.

Option #1 - Automate internal PDF viewer and use Screenshot Verification Point

  • Let test script open the PDF file in a viewer inside of your application.
  • Use a screenshot verification point on the internal PDF viewer tool to verify the contents.

Option #2 (Windows only) - Automate external PDF viewer and use Screenshot Verification Point

  • Let test script open the PDF file in an external PDF viewer tool (Adobe Reader).
  • Let Squish hook into the external PDF viewer tool (see Hooking arbitrary Windows applications).
  • Use a screenshot verification point to verify the contents.

Option #3 - Use external tool for PDF comparison

Extracting text from PDF documents

The following workflows may be possible.

Option #1 - Automate internal PDF viewer to copy and paste the PDF contents to clipboard

  • Let test script open the PDF file in a viewer inside of your application.
  • "Select all" in the internal PDF viewer, copy to clipboard and extract from clipboard.
  • Compare extracted contents.

Option #2 (Windows only) - Automate external PDF viewer to copy and paste the PDF contents to clipboard

  • Let test script open the PDF file in an external PDF viewer tool (Adobe Reader).
  • Let Squish hook into the external PDF viewer tool (see Hooking arbitrary Windows applications).
  • "Select all" in the internal PDF viewer, copy to clipboard and extract from clipboard.
  • Compare extracted contents.

Option #3 - Use external tool for converting PDF to text or for text extraction

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.