# Extract and Validate PDF Content

From Appvance IQ it is possible to read a pdf document and is possible to assert for a string in the whole document or you can also mention asserting for content on a specific page of the document. All from Scenario Builder Assertions.

The below example shows an example of how this can be achieved.

A simple java file was created which browses the pdf document and a jar file was created out of the java file.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/RiYpVyEIdbUBCAMj-bd177c4c0c65.png)Go to Scenario Builder and create a functional scenario with the script type being 'Java' and provide the Class and the method name as desired and browse the jar file.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/aArYzNLow9KyyGQl-ef5c3d822a76.png)Save the scenario and Play the scenario.

Once the scenario is played back successfully, go to the Validation Suite tab and select the required assertions from the drop-down available.

You can choose the test-case, from the drop-down and also choose the step / Request

And provide the expected Value (Expected text that we are looking for from the PDF), Format can be chosen as PDF and the target can be a

- Page number
- A regular expression
- or the full document itself.
 
Once those entries and made, from the Scenario Builder, refresh the scenario to have those assertions added. Check the below screenshots for reference.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/gDjLJtatETDeTxjG-9dc7dc615c38.png) ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/O11Zt7vSLwoAJYAa-c7e59a1f331a.png)Save the scenario again and playback the scenario to check the results of the pdf validations.

<div id="bkmrk-last-updated%3A-june-2">---

Last updated: <span class="mc-variable General.NewDateTimeVariable variable">June 26, 2023</span>

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

</div>