[FREE] Create PDF file Extension. Layout to PDF

Thank you @Juan_Antonio

3 Likes

2 posts were merged into an existing topic: Creating and Sending PDFs via whatsapp or email

hi
it seems that the extension no longer saves in internal memory.
after updating my cell, it doesn't work.
first created the .pdf file
my GetApi returns 30.
I use the pdf10 function even when using the aia file downloaded on the kio4.com website it does not work.
someone has tried yet.
thank you

@Giovanni_Maria_Lombi

To work on Android 10+, you must use the Create10, AddPage10 and Finish10 blocks, the file the_pdf.pdf will be created in
/storage/emulated/0/Android/data/'namepackage'/files/

1 Like

Thank you for your answer.
already use Create10, AddPage10 and Finish10 blocks.
but the file is not found.
also using the aia file referenced on the site, the comida.pdf file is not found.
I had no problems before.
in my opinion something has changed on version 11 api30
try to see this link
Problem with July 30 2020 Version: nb184 no longer able to write and read files - #50 by ewpatton anke
but I'm not an expert and maybe I'm wrong

Just built a project from scratch, and tested, using Companion app, on

Android 10 (genymotion emulator)
Android 11 (google pixel 4a)

PDF created OK with both.

Order of things:

  1. Show context
  2. Create the pdf
  3. Add a page
  4. Finish
  5. Read pdf to image component

Try my aia project. I have added a click event to the image, if you touch the image after reading the pdf you get the message, scroll the page to see the original vertical arrangement.

pdfA11.aia (12.0 KB)

1 Like

i have try you new aia file, but, sorry no work for me.
strange because it worked well before.
if it can be useful to you. I have a samsung.
try to test on a samsung terminal.
thank you

Thanks @TIMAI2 for testing the extension.

I have tested Tim's code and it works for me on Android 9, MIT Companion and installed.

pdfA11_B.aia (12.0 KB)

ok the app reads the file created, but if I look for it, the file.pdf physically in my internal memory can't find it.
while before I saw the file.pdf.
is there any way to save it in Download?

thank you.

Why save to downloads? Explain what you want to do.

because in android 11 the android / data folder is no longer visible. (it is empty) before I could open the pdf file and print its content.
now the created.pdf file is no longer visible for android restrictions.

if you can save in Download or Document you can again (in android 11) open the file and print.
it is important for my app.

thanks for your help.

1 Like

Currently (April 2021), it is possible, using a file extension, to copy/move files to common folders on the sdcard.

This may change when AppInventor starts to target API 30 (full on Android 11 with all restrictions applied), and our current understanding is that you cannot then copy files in the same way.

We won't really know what the possibilities will be until Google/MIT sort all this out.

2 Likes

well, for now i will use copy to fix in android 11.
thanks.

Hello
How can I add more than one layout (exable 2 Horizontal Arrangements) to the Block ad page layout .

I need add in layout in the above block for exable Horizontal Arrangements1 + Horizontal Arrangements

1 Like

Try this

HorizontalArrangement1 ... Visible true
HorizontalArrangement2 ... Visible false

Add HorizontalArrangement1

HorizontalArrangement1 ... Visible false
HorizontalArrangement2 ... Visible true

Add HorizontalArrangement2

1 Like

I do not understand exactly how to do it. Can you write the code? I did the following but created three pages with large spaces instead of one page.

If you only want one page, create a VerticalArrangement1, inside HorizontalArrangement1, HorizontalArrangement2, HorizontalArrangement3

AddPage: VerticalArrangement1

Hello
I want to make an A4 page.
How many pixels should I put in height and width?

Try.
Go testing with different measures.

Hello
How can I put in the above example the height to be automatic and not a number (example , not high=1000, but automatic)

1 Like