PDF button visibility by user role allows you to control who can see the PDF button and generate PDFs from your WordPress content. This feature is perfect when you want to:
- Restrict PDF generation to logged-in members only
- Make PDF generation available only to administrators and editors
- Provide premium content in PDF format exclusively to paid members
Setting Up Role-Based Visibility
- Go to DK PDF > Settings
- Click on the PDF Button tab
- Scroll down to find the “Visibility by role” setting
- Click on the dropdown field to see all available options

You can select multiple roles at once:
- Click on each role you want to allow access
- Selected roles will appear as tags in the field
- To remove a role, click the “×” next to it

How It Works
When you select specific user roles, only users with those roles will be able to:
- See the PDF button on your posts, pages, or WooCommerce products
- Click the button to generate PDFs
- Access PDFs directly via URL
Users without the required role will not see the button at all, and if they try to access a PDF directly, they’ll see an “Access Denied” message.





