What I’m trying to do:
Access an asset on my server via PdfReader
What I’ve tried and what’s not working:
I get the following error:
PdfParseError: Could not read PDF file _/theme/xcc_template.pdf
at /home/anvil/.env/lib/python3.10/site-packages/pdfrw/pdfreader.py:572called from ServerModule1, line 10
I’ve tried /_/theme/xcc_template.pdf, theme/xcc_template.pdf, xcc_template.pdf and (the server path I get from the UI above _/theme/xcc_template.pdf
I also searched the forums here and it does seem that _/theme/xcc_template.pdf should be the correct path judging by other similar examples of assets in the root. I feel like I just gotta be missing something obvious but I’m stumped.

I also tried downloading and opening the PDF and it is a valid file when that didn’t work I then re-exported it from Adobe and re-uploaded the asset pdf.
Code Sample:
# this is a formatted code snippet.
# paste your code between ```
`@anvil.server.callable
def fill_xcc_pdf(characters): # expects 4 characters
from pdfrw import PdfReader, PdfWriter, PdfDict
template = PdfReader("_/theme/xcc_template.pdf")
# Map each character to PDF field names`
Clone link:
Novice coder here (obviously) and very new to Anvil. Thanks in advance for any guidance!
-Ray