PowerPdf and me lazarus / 4-Ported from Delphi-Kylix ---------------------------------------------------------------------- carlangas · 2008-01-28 09:44 Here I go again. This time, I trying to print some .jpg photos, one for every page. Then, I create a TPReport, a TPRPage, a TPRLayoutPanel, and a TPRJPegImage, and use PRJPegImage.Picture.LoadFromFile('foto01.jpg'), then I print the page, and Load another photo with PRJPegImage.Picture.LoadFromFile('foto02.jpg'), print this, and so on. Nothing seems to faiil. In fact, if I show it on the screen, I see the images change, but when I open the resulting .pdf, all the pages are the first photo. What am I doing wrong? ---------------------------------------------------------------------- arwen · 2008-01-30 10:13 You are right, there must be a problem. The only system is to generate a file each page , in practice do something like this : Code: [Select]   PReport1.BeginDoc;   PRLabel1.Caption := 'Secondo pulsante';   PRjpegImage1.Picture.LoadFromFile('prima.jpg');   PReport1.Print(PRPage1);   PReport1.EndDoc;   PReport1.FileName := 'default2.pdf';   PReport1.BeginDoc;   PRLabel1.Caption := 'Secondo pulsante Seconda volta';   PRjpegImage1.Printable:= true;   PRjpegImage1.Picture.LoadFromFile('dopo.jpg');   PReport1.Print(PRPage1);   PReport1.EndDoc;  :shock:  :shock: I had many problems in generating reports with Lazarus but I have not yet tried the library : http://sourceforge.net/projects/braslib/ If this works better tell me about  :wink: ---------------------------------------------------------------------- carlangas · 2008-01-30 18:18 I've found it: http://www.developpez.net/forums/showthread.php?t=39124 You only have to change the SharedImage property of TPRJpegImage or TPRImage to FALSE. If not, it copies the same image to all the pages. I suppose it could be to save space if you print a logo or something like that. I tried changing it visually and gave no result, but changing it in my code did what I was looking for. About the other library, I've just tried to compile it, and it complains. Maybe another day. For now, I think powerpdf will work (if I can understand it).