Pdf generation error if not logged in

I have successfully created a pdf on website it is generating sucessfully but only after login if i am not logged in i get error in while i am trying to print

Traceback (most recent call last):
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/app.py”, line 60, in application
response = frappe.api.handle()
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/api.py”, line 54, in handle
return frappe.handler.handle()
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/handler.py”, line 38, in execute_cmd
File “/home/shahid/meeting/frappe-bench/apps/frappe/frappe/handler.py”, line 51, in is_whitelisted
raise frappe.PermissionError(‘Not Allowed, {0}’.format(method))
PermissionError: Not Allowed,

please help me to know how this works

@shahid_khan021 The PDF is only have access enabled to logged in users!

In the case of emails, the PDF is sent as attachment, and the options “View this on browser” display to you an HTML preview, with an auth key that is embedded in the link into the Email.

My suggestion is, if you need that someone access the PDF from the website directly, you need do it by teweaking with some code!

For example, you can generate the PDF and store it in the Public File, or make your own method to enable the access for the users into the WebSite.

The permission is an important think into the ERPNext, due, that today anyone can scrap your entire information using API brute force, and data extraction from PDF´s

@max_morais_dmm you were saying that is unsecure to gnereated pdf file with out login