using streaming images lazarus / 31-LCL ---------------------------------------------------------------------- alexpseletr · 2018-06-03 13:33 how do I use the streaming images directly without using the temporary file, today I use the example below Barcode1.DrawBarcode(png.Canvas); png.SaveToFile('codigo_barras.png'); imgbarras := pdf.Images.AddFromFile('codigo_barras.png',False);  //fcl-pdf Page.DrawImageRawSize(125,38.5, 198, 34, imgbarras);  I would like to use loadfromstream ---------------------------------------------------------------------- wp · 2018-06-03 13:55 Not tested, but try this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var  stream: TMemoryStream;....  Barcode1.DrawBarcode(png.Canvas);  stream := TMemoryStream.Create;  try    png.SaveToStream(stream);     // Write png to stream    stream.Position := 0;         // Rewind the stream.     imgbarras := pdf.Images.AddFromStream(stream, false);  // read stream back into pdf    Page.DrawImageRawSize(125,38.5, 198, 34, imgbarras);    finally    memorystream.Free;  end; ---------------------------------------------------------------------- alexpseletr · 2018-06-03 14:00 error Error: Incompatible type for arg no. 2: Got "Boolean", expected "TFPCustomImageReaderClass" =>imgbarras := pdf.Images.AddFromStream(stream, false); solved imgbarras := pdf.Images.AddFromStream(stream,TFPReaderPNG, false); thank you