# 'utf-8' codec Error when reading a pdf file using FileReaderTool

**URL:** <https://community.crewai.com/t/utf-8-codec-error-when-reading-a-pdf-file-using-filereadertool/3395>\
**Category:** CrewAI Community Support\
**Tags:** tools\_issues\
**Created:** [January 30, 2025, 10:36pm UTC](https://community.crewai.com/t/utf-8-codec-error-when-reading-a-pdf-file-using-filereadertool/3395 "2025-01-30T22:36:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Puja\_Kamath](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/puja_kamath/32/2339_2.png) [@Puja\_Kamath](https://community.crewai.com/u/Puja_Kamath)\
**Post date:** [January 30, 2025, 10:36pm UTC](https://community.crewai.com/t/utf-8-codec-error-when-reading-a-pdf-file-using-filereadertool/3395/1 "2025-01-30T22:36:20Z")

</div>

I want to read a pdf file for analysis purposes and summarize it in a certain way and write that summary to a different file.

I am using FileReaderTool to read the pdf file which is given to the agent for analyzing the file, but I keep getting the following error: ## Tool Output:  
Error: Failed to read file /Users/pujakamath/PycharmProjects/aiagents/newagent/src/newagent/sample\_prd.pdf. ‘utf-8’ codec can’t decode byte 0xd3 in position 10: invalid continuation byte

The usecase is to read a pdf flle for further analysis and not do a query search hence i’m not using a PDF Rag Search. Any help and recommendations to solve this error will be greatly appreciated.
