Webtest WebTest GitHub Home

PDF Step pdfVerifyEncryptionProperty

Description

This step verifies a property of the encrypt dictionary from an encrypted PDF document. The step must either verify the existence of the encrypt dictionary property key or it must verify its value.

Parameters

key
Required? yes
The text of the encrypt dictionary property key.
description
Required? no
The description of this test step.
exists
Required? yes/no
Specifies whether the property/field of interest is expected to exist or not. Must not be set if 'value' attribute is set.
regex
Required? no, default is 'false'
Specifies whether the value represents a regular expression.
value
Required? yes/no
The text/regular expression required to match the property/field of interest. Must not be set if 'exists' attribute is set.

Details

Here are some examples using the pdfVerifyEncryptProperty step:

pdfVerifyEncryptProperty 1
<webtest name="pdftest - verify encrypt property existence">
  <config .../>
  <steps>
    <invoke .../>
    <pdfVerifyEncryptionProperty description="Encrypt property existence"
      key="SubFilter"
      exists="false"/>
    ...
  </steps>
</webtest>
pdfVerifyEncryptProperty 2
<webtest name="pdftest - verify encrypt property value">
  <config .../>
  <steps>
    <invoke .../>
    <pdfVerifyEncryptProperty description="Encrypt property value"
      key="Filter"
      value="Stand.*"
      regex="true"/>
    ...
  </steps>
</webtest>