Problem in print

Hi guys,
I'm having difficulty printing in pdf. Specifically, it is printed in the display format of the phone, while using different devices, I need the print size to be fixed. How can I do?
To print in pdf I use the Kio4 extension.

This doesn't look correct

You are hard coding the path to the pdf ?

I presume you are using the chrome browser / google pdf viewer to show and print? What settings are offered there, this probably has nothing to do with your app or pdf dimensions ?

1 Like

No, the procedure open pdf with AcrobatReader.
The problem is:
In my device: (print is ok)

In other device (print not ok):

Is there a method to print the entire tableview in A4 regardless of the device used?

Acrobat Reader should offer you some settings ?

The problem is the creation of the pdf, Kio4 prints the indicated layout in pdf but each device has different resolutions and different settings. I need a fixed A4 print.

https://www.adobe.com/devnet-docs/acrobat/android/en/workingwithpdf.html#print-pdfs

sorry I can't explain myself well.
The problem depends on the device on which I start the print. For example, if I had a device with a wider screen (tablet for example), printing would be good because Kio4 prints the data of the displayed layout.

The KIO4_PDF extension is not printing anything, it creates a pdf of the layout and dimensions you provide. Acrobat is doing the printing and setting the print size of the pdf provided.

I do not have Acrobat installed, so cannot do any testing for you.

For what it is worth A4 dimensions are of the ratio 1:0.7070 so your should be outputting your pdf to 2600:1840 to provide an A4 size for printing.

Ok, that's right.
But the Kio4 print the layout. If the table extends beyond the phone screen, it will not print.


I have tried increasing the witdh with no results.

That is something different....

1 Like

Sorry I couldn't make myself understood.
Do you have any ideas to help me?

Have you found the "shrink to fit" setting for TableView ?

Yes, but the result is not well, because printing is based on the device screen.

And this is the same when you actually print it out ? Different output size depending on device used ? Or are you just talking about the pdf display on screen?

The print size is relative to the screen size.
For example if the screen were bigger, printing would be fine.

hmmm,

Try increasing the output size in KIO4_PDF to 5200 : 3680

what happens then ?

The result not change.

Any idea to help me?

Try:

Delete Acrobat reader
This should make the activityStarter call Google Chrome / PDF viewer
File path might be an issue (could require content uri)
Try printing from there...

1 Like

It is a test that I had already done, nothing changes.
Is there any way to "trick" into setting a false screen size?