ianb
February 8, 2023, 3:39pm
3
I am going to aggregate some forum links here because I have seen requests for how to do this from people before, and you have to know plenty of anvil concepts before you can get to the point of the app above:
Hi There!
First of all i love the simplicity which the Anvil PDF creation offers, thus I hope to find a soltion which allows me to stay with anvil pdf’s. Any suggestions appreciated.
Usecase
I have a list of offers which can be printed. Currently there is a button in each row which lets you print the offer. This is already used in Production Version and works pretty good.
Now we want to be able to select multiple orders and print all selected Orders (lets say up to 100 Orders). Thus no loop…
Hello,
I have a question on generating PDF with/without background tasks.
My PDF is a A4 page with 25-30 labels to be filled.
All the data are searched before from table as the code below(as the tutorial)
If I run this function from Anvil(IDE) it works perfectly, even without background tasks, but if I run with function from browser(as a client) I always get an error “Timeout server” or when using Background tasks the error “Exception: PDF generation failed: Components did not load within al…
I have a report which takes about 40 sec to generate (there are a lot graphs)
Now I used Brookes tutorial on PDF to generate a pdf and got that error message:
anvil.server.TimeoutError: Server code took too long
What shall I do? (don´t want to seperate the report on several forms).
Cheer Aaron
I want to generate a report as PDF - but doesn’t work because of only 30sec server
Client-side:
I do the calculations before and narrowed time down to 2sec. Then I call the server-function.
Still it is not able to do it. Does PDFRenderer take more than 28sec for about 5-6 pdf.pages?
Server-side:
@anvil.server.callable
def create_pdf_assessment(formtouse, game_event,optimizer,part, data_pack):
import anvil.pdf
from anvil.pdf import PDFRenderer
pdf = PDFRenderer(filename="Assessment-Rep…
2 Likes