Probleme de qualité image dans

Bonjour à tous,

Je suis en train de créer une application qui complète un "PDF" existant afin d'en faire une impression 21/29,7.

J'ai un fichier "PDF" que je converti en "JPG" (sur mon pc), je place ce "JPG" en image de fond dans un "arrangement vertical" (qui prend tout l'écran), puis j'affiche un certain nombre d'informations sur cet "arrangement", puis je crée un "PDF" avec extension "KIO4_pdf" (à partir de cet arrangement).

Tout fonctionne bien mais l'image de fond dans le "PDF" est de mauvaise qualité (surtout pour une impression 21/29,7), les textes de l'image sont pixelisés (pas ceux que j'ajoute par dessus), alors qu'ils ne le sont pas lorsque j'ouvre limage et que je zoome depuis mon pc (jusqu'à un certain point bien sur, mais le but est d'obtenir une qualité pour une impression 21/29,7).

J'ai essayé avec "PNG" (ce n'était pas concluant), j'ai essayé avec un "JPG" de différente qualité, jusqu'à 4800/5940 pixels (en augmentant la qualité lors de la conversion "PDF" -> "JPG" mais cela ne semble rien changer à partir d'un moment), j'ai essayé avec un "SVG" et l'extension "SVGimages" (sans jamais arrivé à afficher une seule image dans mon arrangement).
J'ai remarqué que la qualité est un peu meilleure lorsque je mets l'option du 1er écran "sizing" à "fixed" (au lieu de "response") mais bon ...

Je fais appel à vous car je ne sais pas comment faire ? Quelqu'un a t'il une stratégie à me proposer pour résoudre ce problème de qualité ?
Merci de votre aide, bien cordialement,

Why don't you just display the original pdf ?

Sure, but how do you do that ?
(becarful : before create the final pdf i need to write on)

ViewPDF - a simple pdf viewer for local files & ViewBigPDF

no i can t use that because i need to write on ....
Is it possible to read the pdf and put it in backgroud image of a layon ?

ViewPdf creates an image/set of images of the pdf for viewing in the webviewer. It should be possible, using some javascript, to get the image path from the web page, and then use that to set the image to the background of an arrangment. (the web viewer does not have to be visible) I have not tried this, but it should work.

ok but i m not be apble to do that ... where is the image create by viewpdf ?

It is usually in the cache

do you know the name of the image in the cache ?

It will be different every time you run the viewpdf.

I am not on my development computer at the moment, so maybe later....

Thanks for your help,

if i dont know the name of the image and if it change all the time it ll be difficulte to use it

but i tried to read a pdf with pdfview
when i use a pdfreader to read my original pdf it very good
but when i use pdfviewer, when i zoom it s not good, is it normal ?

You might want to try my pdf extension, which offers property Quality

Set the quality in dpi to render the pdf page. Default is 72 dpi

.https://puravidaapps.com/pdf.php

Taifun

why not i can try, but the probleme is not to read a pdf,
"Hi there,

I'm building an app that supplements an existing "PDF" to make it a 21/29.7 print.

I have a "PDF" file that I convert to "JPG" (on my pc), I place this "JPG" as a background image in a "vertical arrangement" (which takes up the whole screen), then I display some information about this "arrangement", then I create a "PDF" with extension "KIO4_pdf" (from this arrangement).

Everything works fine but the background image in the "PDF" is of poor quality (especially for a 21/29.7 print), the texts in the image are pixelated (not the ones I add on top), so that they aren't when I open the image and zoom in from my pc (up to a point of course, but the goal is to get quality for a 21/29.7 print).

I tried with "PNG" (it was not conclusive), I tried with a "JPG" of different quality, up to 4800/5940 pixels (increasing the quality during the "PDF" conversion - > "JPG" but that doesn't seem to change anything after a while), I tried with an "SVG" and the "SVGimages" extension (without ever managing to display a single image in my arrangement).
I noticed that the quality is a bit better when I set the 1st screen option "sizing" to "fixed" (instead of "response") but hey...

I'm calling on you because I don't know what to do? Does anyone have a strategy for me to solve this quality problem?
Thank you for your help, best regards,
"

The author of the extension @Juan_Antonio might know, if the quality can be improved while creating the pdf...

Taifun

Maybe, i ll wait his answer.
Else, do you know another aix to create pdf ? or to make what i want to do ?

Tanks for your help,

borrar_pdf_comprime.aia (13.7 KB)

@Jean-Paul
I have created a basic pdf, copy it to the /storage/emulated/0 directory (I use Android 9 and can easily copy it). Then I transfer it to my PC and read it with Foxit Pdf, I can zoom in and it doesn't lose sharpness.

thanks for your answer, but you dont use an image.
Put a image in background of the arrangement, next when you create the pdf and you can see that the image loose her quality ... all you write on the arrangement is very good except the image ...
Why ?

You can avoid all this by not using a pdf in the first instance. Use actual text.

Bonjour

Je ne comprends pas votre réponse, le but est de compléter un pdf que l'on me fourni avec des informations fournies a l'application pour produire un nouveau pdf de même qualité et imprimable.
Il faut bien que je parte de quelque chose pour récupérer le pdf original avant de le compléter. Je ne peux pas juste mettre du texte.

J'avais penser utiliser l'extansion KIO4_pdf, c'est pourquoi j'ai converti mon pdf en une image que j’insère en image de fond d'un arrangement, mais lors de la création du pdf l'image semble perdre sa qualité. Le probleme est peut etre la : L'image pert-elle déjà sa qualité lorsque je la place en image de fond (en prenant peut-être la définition maximal correspondant à l’écran du téléphone...)

Avez vous une autre solution a me proposer pour compléter un pdf existant ? Vous suggérez peut etre que je recrée complétement le pdf mais il y a de nombreux cadre et image. Savez vous comment faire un cadre que l'on pourrait mettre dans un arrangement ?

Bien cordialement,

borrar_pdf_comprime_v2.aia (4.9 MB)

Try changing the dimensions of the VerticalArrangement to 3000x1500