Pdf generation do not work when app built

app working great during usb debug, but when installed as apk, pdf generation do not proceed.

seems app do not find genpdftable.html asset … (and i tried to put it everywhere ;-( )

If your html file is in your assets (media) then use the pathToAssets block from Taifun’s Tools Extension to give you the correct path both in development and compiled versions of your app

using your extension the samsung gt P5200 tablet (the device where apk is deployed) reports that assets path is:

but there is NO folder like that …

You won’t be able to see or access that folder using Android file manager (unless device is rooted) or by connecting with PC.

When in Companion app you can see the AppInventor/assets folder for debugging purposes

using the “media assets” way do not work.
I managed to make it run on my phone (one plus one with lineage os) and a teclast x80 pro tablet (intel cpu with android 7) forcing the path to a “public” folder i made on

here i got all the html and js files

… but still the same way do not work on samsung tablets … samsung stuff is a real mess :frowning:

??? what do you mean by this ?

1 Like

that’s exacltly what i tried …

BUT was not working.

so i made the folders (and subfolders) by hand in the tablet and phone and i copy the assets i downloaded from the “media” window of AI2 gui to that folder.

Pointing the genpdf html page, building and installing the apk on phone and tablet, both works,
Not the same with the samsung one.

Suggest making a simple test project which demonstrates the problem which we can have a look at.

Is it just the finding of the file that doesn’t work, or something else, you have to give us something to go on…

true … i’ll try to synthetize something little to test on …

i made this qr code / url for the test apk

No point providing an apk file…

pdf_gen_test.aia (467.5 KB)

aia file ?

What does your output look like (the pdf when you run companion) ?

All I can see is the wrong block for getting the genpdftable.html file
(and if you are not making a table should you be using genpdf.html ?)

On all devices i simply get a series of tables with checkmarks and some text (generally are all 3 columns).
The problem is on samsung galaxy tab 3, that i do not reach the pdf generation (i reach the “filling data”, but no pdf on the samsung file system).

PS: grapich signs are stored well on all devices in filesystem root and dcim/camera …

I miss the pdf ONLY on samsung devices …

Could then simply be a Samsung device specific thing…I do not know why (but Samsung devices do seem to regularly pop up on the forums as being buggy)