# Getting error "PDFDocument: Stream must have data" after opening .pdf from stored variable between sessions

**URL:** <https://community.thunkable.com/t/getting-error-pdfdocument-stream-must-have-data-after-opening-pdf-from-stored-variable-between-sessions/2195420>\
**Category:** Questions about Thunkable X\
**Tags:** pdf, pdfviewer\
**Created:** [December 28, 2022, 9:22pm UTC](https://community.thunkable.com/t/getting-error-pdfdocument-stream-must-have-data-after-opening-pdf-from-stored-variable-between-sessions/2195420 "2022-12-28T21:22:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jozkobachnicekiy](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jozkobachnicekiy](https://community.thunkable.com/u/jozkobachnicekiy)\
**Post date:** [December 28, 2022, 9:22pm UTC](https://community.thunkable.com/t/getting-error-pdfdocument-stream-must-have-data-after-opening-pdf-from-stored-variable-between-sessions/2195420/1 "2022-12-28T21:22:04Z")

</div>

I save .pdf file to a stored variable and open it in the same session (in a different screen) with pdf viewer , it works properly and opens the file as intended.  
However, when I start another session, I get the error thats in the title. It looks like the .pdf file isnt in the stored variable anymore. Does anybody know, what can be the problem here? I have no knowlege of the file being removed between sessions, the variable also isnt empty - when I tried putting the file into a label (for test if its empty) I got some weird thunkable link starting with blob - probably the local database for web viewer.  
Other stored variables (integers only) are working properly, only this is a problem.  
The problem is also present at .apk version of the app.

Thanks for help.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [March 28, 2023, 9:22pm UTC](https://community.thunkable.com/t/getting-error-pdfdocument-stream-must-have-data-after-opening-pdf-from-stored-variable-between-sessions/2195420/2 "2023-03-28T21:22:33Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
