# I need to read the PDF invoice and verify the fields of it in robot framework

**URL:** <https://forum.robotframework.org/t/i-need-to-read-the-pdf-invoice-and-verify-the-fields-of-it-in-robot-framework/8357>\
**Category:** Robot Framework\
**Created:** [30 January 2025 11:48 UTC](https://forum.robotframework.org/t/i-need-to-read-the-pdf-invoice-and-verify-the-fields-of-it-in-robot-framework/8357 "2025-01-30T11:48:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mustafa02](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/mustafa02/32/4503_2.png) [@mustafa02](https://forum.robotframework.org/u/mustafa02)\
**Post date:** [30 January 2025 11:48 UTC](https://forum.robotframework.org/t/i-need-to-read-the-pdf-invoice-and-verify-the-fields-of-it-in-robot-framework/8357/1 "2025-01-30T11:48:01Z")

</div>

I have a PDF invoice and i need to verify all the fields like amount, currency, date etc.  
I tried RPA.PDF library but it returns the below output which i cannot validate it in my robot framework. So i need another alternate method please.

C:\Users\4star\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host ‘[food-stg.yassir.io](http://food-stg.yassir.io)’. Adding certificate verification is strongly advised. See: [Advanced Usage - urllib3 1.26.20 documentation](https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings)  
warnings.warn(  
…[Match(anchor=‘TTC’, direction=‘right’, neighbours=[‘7.00’])]

 ![2025-01-30 12 44 43](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/e/e8f4b9b50950c5c3f3265569dd85bc4d499f6090.png)

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [30 January 2025 12:13 UTC](https://forum.robotframework.org/t/i-need-to-read-the-pdf-invoice-and-verify-the-fields-of-it-in-robot-framework/8357/2 "2025-01-30T12:13:11Z")

</div>

Hi Mustafa,

Well 2 OCR related questions on this forum in 2 hours … i replied on the other question, but my answer might also help you 🤞

> [@Help needed with formatting text from PDF](https://forum.robotframework.org/t/help-needed-with-formatting-text-from-pdf/8353/3):
>
> Hi John, Well 2 OCR related questions on this forum in 2 hours … I wasn’t sure if I should reply because I’m not an OCR guru, but I’ll tell you what I know. OCR is often quite flaky and the cleaner the image the better the results, I was surprised all your text came through with no incorrect characters, so your input image is quite clean +1 A few years back I performance tested a system that OCR’d invoices from external suppliers, so to test volumes of invoices we needed to generate PDF’s i…

Hope this helps,

Dave.

---

<div class="post-metadata">

**Author:** ![mustafa02](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/mustafa02/32/4503_2.png) [@mustafa02](https://forum.robotframework.org/u/mustafa02)\
**Post date:** [30 January 2025 12:33 UTC](https://forum.robotframework.org/t/i-need-to-read-the-pdf-invoice-and-verify-the-fields-of-it-in-robot-framework/8357/3 "2025-01-30T12:33:36Z")

</div>

Thanks for your suggestion but OCR will not resolve it, i need some library like RPA which can get the invoice fields and in output it returns in json values.

---

<div class="post-metadata">

**Author:** ![falcon030](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/falcon030/32/3420_2.png) [@falcon030](https://forum.robotframework.org/u/falcon030)\
**Post date:** [30 January 2025 16:49 UTC](https://forum.robotframework.org/t/i-need-to-read-the-pdf-invoice-and-verify-the-fields-of-it-in-robot-framework/8357/4 "2025-01-30T16:49:09Z")

</div>

Maybe my reply on another question can help

> [@Help needed with formatting text from PDF](https://forum.robotframework.org/t/help-needed-with-formatting-text-from-pdf/8353):
>
> Hello, I’m using [Pdf2TextLibrary](https://github.com/qahive/robotframework-pdf2textlibrary?tab=readme-ov-file) to convert a PDF-file into text. The PDF contains a table-like structure showing days of the week, hours (worked) and status (approved). However, after converting into text, the formatting is not exactly how I would like it. It first grabs al the days (the first column) and then it seems to grab both the columns hours and status and put them in random order into text. I tried to remove or replace words and empty lines to get somewhat of a better format, but what …
