Best way to print a tabular data

Hello Community,

I have started using thunkable recently. I am developing a small application for my shop where weight of few items will be added and the end result is a spreadsheet with the item, rate, weight and amount column. In the end, I would like to print that sheet.

I see that one cannot call the printing service from the app itself. Can anyone point any efficient way of getting the table printed ?

Here is the link to my project

https://x.thunkable.com/copy/a52000b4db95693cfd296e32a683f6bf

Regards,
Vinesh

1 Like

If you use Google sheet as your Data Source then you can print it from Google sheet.

1 Like

Thanks for response. I actually want to print the table on the fly via the app using the table that I update using the app. Any reference / help to achieve this will be appreciated.

A couple thoughts (none perfect):

  • Lay out your spreadsheet on a canvas and print it, like described here:
    Simple printing of an image via share

  • Figure out how to generate a PDF using some API on the internet somewhere. This might help: Create a PDF from app . You can feed that PDF into the share block - on iOS printing is an option for a shared PDF. (I’m not sure about Android.) Yes, that block says images, but it’ll take a PDF (at least on iOS). It’ll also take a text file, but at least on my iPhone, there’s no option to print a .txt file shared with the “share image” block.

  • Write some javascript and host it somewhere on the internet. That javascript can take your input data (in a query appended to the URL) and format it nicely into a table. Use the “open link” function to open that page with the javascript in the phone’s native browser, and then your users can print from the browser (not webviewer). (You can probably get the print dialog to open automatically with more javascript.)

3 Likes

Remember, Share image does not work on Android. Another flaw that Thunkable has not fixed for a long time.

Thank you for that, @muneer! I mostly develop/test for iOS so had missed that.

1 Like