# PDF file reader

**URL:** <https://forums.pega.com/t/pdf-file-reader/5969>\
**Category:** User Experience\
**Tags:** 8-8, user-experience, senior-system-architect\
**Created:** [February 1, 2024, 4:52am UTC](https://forums.pega.com/t/pdf-file-reader/5969 "2024-02-01T04:52:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rakesh\_Chilukuri](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/rakesh_chilukuri/32/10902_2.png) [@Rakesh\_Chilukuri](https://forums.pega.com/u/Rakesh_Chilukuri)\
**Post date:** [February 1, 2024, 4:52am UTC](https://forums.pega.com/t/pdf-file-reader/5969/1 "2024-02-01T04:52:47Z")

</div>

I have a requirement.

First, I will upload a PDF file, after uploading the file, the content within that file should be displayed in one section. How can i achieve this?

---

<div class="post-metadata">

**Author:** ![SoumyajitB1](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/soumyajitb1/32/5894_2.png) [@SoumyajitB1](https://forums.pega.com/u/SoumyajitB1)\
**Post date:** [February 1, 2024, 6:00am UTC](https://forums.pega.com/t/pdf-file-reader/5969/2 "2024-02-01T06:00:53Z")

</div>

Hi@Rakesh Chilukuri please use the following code in your non auto generated section.

You will find YOURBASE64DATA in Data-WorkAttach-File instance in pyAttachStream property.

```auto
<object data="data:application/pdf;base64,YOURBASE64DATA" type="application/pdf"></object>

```

---

<div class="post-metadata">

**Author:** ![Rakesh\_Chilukuri](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/rakesh_chilukuri/32/10902_2.png) [@Rakesh\_Chilukuri](https://forums.pega.com/u/Rakesh_Chilukuri)\
**Post date:** [February 1, 2024, 8:41am UTC](https://forums.pega.com/t/pdf-file-reader/5969/3 "2024-02-01T08:41:28Z")

</div>

@SoumyajitB Can you please elaborate more

---

<div class="post-metadata">

**Author:** ![SoumyajitB1](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/soumyajitb1/32/5894_2.png) [@SoumyajitB1](https://forums.pega.com/u/SoumyajitB1)\
**Post date:** [February 1, 2024, 10:00am UTC](https://forums.pega.com/t/pdf-file-reader/5969/4 "2024-02-01T10:00:54Z")

</div>

@Rakesh Chilukuri Sure I can, please follow the below steps:

1. After you upload a PDF file you will find base64 data in Data-WorkAttach-File class instance.

2. pyAttachStream is the property in Data-WorkAttach-File where you will find the base64 encoded data corresponding to the PDF file you have uploaded.

3. Once you have extracted the base64 data, then create a section to show the PDF file.

4. In the section, go to HTML tab and uncheck Auto-generated HTML checkbox.

5. Now you will get a HTML code editor on the section.

6. In this HTML code editor, paste the below code.

1. In the above code snippet replace YOURBASE64DATA with the base64 data that you have extracted in point 3.

2. Execute the section and on runtime it should display the uploaded PDF file.

Let me know if you face any issues further.
