[FREE] Create PDF file Extension. Layout to PDF

Unless I did a mistake in converting in "10" blocks, it doesn't seem to work ?
get a error message on btnreadpdf with "open failed: ENOENT (No such file or directory)"
and a no such file found error for SharePdf and the file doesn't exist.
and the test.pdf that I could find with a search for its name in the file explorer doesn't appear at all.
So it looks like the "10" blocks and "not10" blocks are more different than just the use of ASD ?

I have tested these blocks on Android 7, 8.1, and 10, all three work fine.

Screenshot Android 7

2 Likes

Where is the PDF file created then for these blocks ?

1 Like

Thanks Timai, I adapted your blocks (using "10" blocks) and relative path and got it to work on my API28.
Thanks a lot !

1 Like

in the ASD :slight_smile:

1 Like

2 posts were split to a new topic: How do I create a pdf book app?

Thanks a lot for your extension, Juan Antonio.
I found it extremelly useful.
I never imagined I could make a .pdf file using just a single block.
In case somebody wants to make a .pdf of the size of a Din A4 sheet of paper, can use this data for width and height:

2 Likes

Hello

Is it possible to use this extension to fill out a sheet like this?

Thank you

It is a screen with a lot of information, try it first with a simpler screen.

How come if I use these values for height and width I don't get the whole screen display as A4 format?


blockspdf

Maybe it only works for a specific device with a specific resolution. You should use Juan's recommended method for sizing your pdf, and adjust accordingly.

image

If you want that some screen arrangements fit in a certain paper page size... ¿Shouldn't you do some maths to reduce the size of the arrangements accordingly?

Very willingly but I have to understand what the number I insert in the width and height corresponds to

They are Postscript units.
In the comment of my blocks you have the calculation to convert the hight of a DinA4 paper Sheet (in millimeters), to inches, and then to Postscript units.
You easily can find on the web the conversion factors.

In this case did you set precise values in the vertical arrangement or did you put fill parents or automatic as values in the designer?

I`m not an expert on that.
In your case, I think I would prefer to set them in pixels.
But I'm afraid that you still will have to handle the problem of different device's screen resolutions.

I am only interested in viewing the pdf created on A4 sheet regardless on the device I use

I think it's not a question of the device someone uses to see the .pdf file you created and sent them.
But the resolution of the screen of the device you use to create the .pdf file.

Yes, unfortunately it is! Do you have any suggestions for solving this problem?

Trial and error.
Please, share your conclusions when you are done.