Problem printing images lazarus / 8-Other ---------------------------------------------------------------------- meanface · 2007-02-22 20:46 Hi, I'm a new user and have a wierd problem. I've written a program (for Windows) that displays and prints text and images on screen, with the option of printing. Some of the images are JPEGs of scanned A4 pages (~4500w by 6000h), but the others are smaller. The printers all report their page width as ~4800 (pixels?). On the system I used for coding on, everything is fine (mono laser printer - samsung ml1510). I have another printer though, (a Lexmark z738 colour injet) which prints only the text, and doesn't give any errors. I just get a blank page for the A4 scans. On another PC (colour laser printer, epson c500, I think) the 'A4' scans won't print - trying to print them causes the error "Failed to create bitmap", but the smaller images are fine. On another PC (mono laser - Canon LBP1120) the 'A4' scans give the same error, and the text but none of the smaller images print. On my laptop (with the Lexmark z738 colour injet) no images are printed, but there are no errors either. In all cases where the pages have a mixture of text and the smaller images, the text is shown, and there is blank space where the image *should* be. Here's some example code for the printing (I've included lazjpeg, printers4lazarus and printers in the uses sections, and added Lazjpeg as a project dependeny). As you can see, I tried a range of image formats: Code: [Select]procedure TForm4.Image3Click(Sender: TObject);   { print an infosheet } CONST VerticalSpacing = 150; CONST GeneralFontSize = 16; VAR PagePosition : Integer; begin   PagePosition := 300;   Printer.BeginDoc;   Printer.Canvas.Font.Name := 'Arial';   Printer.Canvas.Font.Size := GeneralFontSize;     Image3.Picture.LoadFromFile('c:\letterhead.bmp');   Printer.Canvas.Draw(300,PagePosition, image3.Picture.Graphic);   PagePosition := PagePosition + (Image3.Picture.Height) + VerticalSpacing; printer.Canvas.TextOut(300,PagePosition,'sample text sample text'); Image3.Picture.LoadFromFile('c:\letterhead.png');   PagePosition := PagePosition + (Image3.Picture.Height) + VerticalSpacing;   Printer.Canvas.Draw(300,PagePosition, image3.Picture.Graphic); printer.Canvas.TextOut(100,PagePosition,'sample text sample text'); Image3.Picture.LoadFromFile('c:\letterhead.jpg');   Printer.Canvas.Draw(300,PagePosition, image3.Picture.Graphic);   PagePosition := PagePosition + (Image3.Picture.Height) + VerticalSpacing; printer.Canvas.TextOut(100,PagePosition,'sample text sample text'); printer.enddoc; end; I don't understand why my images aren't printing, can anyone help? I'm using FPC 2.0.4 and Lazarus 0.9.20, compiling for Windows, coding on Windows XP SP2. ---------------------------------------------------------------------- meanface · 2007-02-28 17:05 *bump* Anybody? ---------------------------------------------------------------------- jesusr · 2007-02-28 18:27 Can you submit a bug report in bug tracker ( http://www.freepascal.org/mantis/main_page.php)?  so it wont be forgotten, use project lazarus packages for that., specify OS, lazarus revision and FPC version. Please attach a testing project and data, if images are too big please provide a link to download them, if possible try to avoid volatile image paste sites. As last resourse sent them to jesusrmx a yahoo.com.mx ---------------------------------------------------------------------- meanface · 2007-03-01 00:25 Before I do that, are you sure this is a Lazarus bug, rather than a problem with my code?