Hello.
i’m trying to generate pdf report using anvil.pdf.form_to_pdf . There is a post describing the basics of form_to_pdf library. But i couldn’t find any documentation on that library.
The thing is - my first page in pdf file rotates 90 degrees counterclockwise and gets landscape layout.
All was fine while plot on that page was small, but as data grows page rotates.
Rotated example:
(can’t post non rotated picture yet - new user here)
Is there anything i could pass to form_to_pdf?
pdf = anvil.pdf.form_to_pdf("PrintReport",records,pd.to_datetime(dt1, unit='s'),pd.to_datetime(dt2, unit='s'))
Welcome, @roman.starun
Yes, there are additional parameters. You can find a listing at
https://anvil.works/docs/media/creating_pdfs
1 Like
i found only for
render_form
but i’m using
form_to_pdf
Now i’m sending fewer data for plot, limiting it to 10 rows. At that point it’s ok and works fine.
Hi @roman.starun,
Can you share an example of an app+code that demonstrate this issue (the PDF coming out sideways), so we can take a look at it? (You can share a Clone link of the app, and then paste or DM me an Uplink script and CSVs to replicate the issue. If you’re OK posting the Uplink script publicly, make sure to remove the Uplink key!)
Thanks! How can I invoke it so as to get the sideways page?