Hello, I’m using the Bubble plugin “SelectPDF” to allow my clients to download a PDF of their invoices.
For security, the client must be logged in, and the “invoices” database has a “privacy rule” set to display only the invoices related to the logged-in client.
Let’s assume my URL is mysite.com/invoice/12345
I set up my SelectPDF workflow as follows:
- “internal page”
- “data to send” = Current’s Page Invoices
- “run as” = Current User
Everything works well, but I want to HIDE certain elements in the PDF, such as the menu bar, footer, etc. Ideally, I would simply pass an additional parameter in the URL like &printmode=1 and then not display the unwanted elements. However, it seems impossible to pass a URL parameter with “Internal URL” and if I use the “External URL,” the “Run as Current User” feature seems to be ignored, resulting in a blank template in the PDF!
Has anyone faced the same issue? Any solutions? I’d like to avoid duplicating my invoice page in a “printable” version.
Also, I’ve managed page breaks by adding HTML/CSS. I’ve tried using CSS @media print with display
to hide my menu/footer, but it doesn’t seem to be recognized by SelectPDF.
Thanks a lot for your help, or if you have an alternative solution, I’ve looked at other plugins, but none seem to support the “run as current user” functionality.
P.S. Or Bubble would have to integrate the SelectPDF API option that allows you to exclude CSS classes and HTML IDs from the conversion: SelectPdf for .NET - Exclude Elements from Conversion with Html to Pdf Converter - C# / ASP.NET
If I use the Select PDF API directly, I could no longer use the “Run as Current User”, right? Or is there a way to “fake” that by adding a token or something in the URL?