image in report pdf

Hello,
I store some images in database, and would like to print them on pdf report.
The image type is JPG, and the resolution is high for see it with a zoom on the form application.
But when i print it on pdf report, it’s huge. When i apply a width an height size on property of the field on pdf report, it’s pixellized.
How can I have a good resolution on the form (screen), and a good size on PDF?

I try to use other format than JPG, but no-one is recognized…(pdf, SVG,…)
The database is firebird, type blob image.

Best regards,
Olivier

Hello,

Nobody has this problem??
Best regards,
Olivier

Hello,

It’s good with “image in archive”, not with image in database".
Best regards,
Olivier

When you apply the height and width constraints it shrinks or stretches the image probably without maintaining the aspect ratio, thus the pixelation. Have you tried uploading a pre edited smaller image that matches the required dimensions? Also after you applied the height and width constraints does the image also show up pixelated on the form?

Update: I just noticed there is an option to maintain aspect ratio. Have you set that to yes?

HI there
You said that you want to print your stored image on pdf report.If i were you ,i’d like to convert the image to pdf first.Then print the pdf files using a pdf program.That would be more convenient.
I know there are many image program which supports to change the size of image.BTW,i want to know that if there is any image program which supports to work offline?
Thanks for any suggestion.

Hi, Nana111.
As you see, there are many free conversion tools online. But I don’t suggest you to use them to do with your conversion work. Because I always believe that the free tools online do not have so many professional functions as the paid ones. And it is said that some of them might contain some virus. Check some free trials of the paid professional conversion tools to convert pdf to image using C#.NET first before you make your final decision if possible. I also suggest you choose one whose way of processing is simple and fast. It can save a lot of time for you. Remember to do your conversion work according to its tutorial page about Pdf conversion. I hope you success. Good luck.

Best regards,
Pan

Hi, Nana111.
Thanks for your nice sharing. I wonder does the toolkit you mentioned above offer free trial package for users to check. Any suggestion will be appreciated. Thanks in advance.

Best regards,
Pan

View the source of the pdf. There you will find the pdf commands. See this example: http://www.tcpdf.org/examples/example_009.phps
sc also has a function for showing images in the pdf. I dont recall the name but it is similar. sc_pdf_image I think.
You do not need to resize the image with an external program tc_pdf supports this by itself.

It’s Scriptcase 9 year 2019 and same problem. If image is in sub select and if I resize it, I have the same problem. If no resize than no problem. Also if it’s not in sub select, both way no problem.

I am having problem with FPDF Image() function, I keep getting the following error msg.
[TABLE=“align: center, cellpadding: 0, cellspacing: 0”]
[TR]
[TD=“align: left”]Error[/TD]
[/TR]
[TR]
[TD=“align: center”]fopen(grp_NM_img_NM_spslogo.png): failed to open stream: No such file or directory[/TD]
[/TR]
[/TABLE]

After uploading the image to the project, the image is inserted into the applications thru Applications > Settings > Application images and click on the icon next to the garbage icon to add an image.

The image will be in the folder ?app/project_name/_lib/img? in the development environment and in the production, will be ?/project_name/_lib/img?.

How do we get FPDF Image function to find the correct path?

I tried many variation but still get the same error…

$pdf->Image(“grp_NM_img_NM_spslogo.png”,10, 0, 180, 40,"","_lib/img");
$pdf->Image(“grp_NM_img_NM_spslogo.png”,10, 0, 180, 40);
$pdf->Image("…/_lib/img/grp_NM_img_NM_spslogo.png",10, 0, 180, 40);

Hello,
try in
event / onrecord
a variable with the path of the image:
$image_file = ‘…/_lib/img/logo.jpg’;
then in the pdf code
$pdf-> Image ($image_file, ‘10’, 0’, ‘180’, ‘40’, ‘’, ‘’, ‘’, ‘true’);
it should work