Hi there!
I´m using aspose pdf to create a pdf and sending by email. The thing is my code works on local but when I deploy it I get the next error:
Proxy error(ArgumentNullException): Value cannot be null. (Parameter ‘key’) in document.save(final_path)
I have check it several time and there´s no null argument.
My code is really basic:
with tempfile.NamedTemporaryFile(delete=False, suffix=".pdf") as temp_file:
final_path = temp_file.name
document = ap.Document()
page = document.pages.add()
text_fragment = ap.text.TextFragment(f"""
info
""")
page.paragraphs.add(text_fragment)
document.save(final_path)
return final_path
Please, someone can help me?
Greetings!