getting list of printers lazarus / 21-General ---------------------------------------------------------------------- irawan · 2022-03-01 05:04 i want to print raw data to non default printer. to reach this, i want to put all available printers on a combobox. but here my code to get printers list 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 uses  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls,  Printers;   procedure TfMain.FormCreate(Sender: TObject);begin  cbbPrn.Items := Printer.Printers;end;         here i got access violation. win 10 x64, Lazarus 2.2.0, FPC 3.2.2. any info [Edited to add code tags: please read How to use the Forum]. ---------------------------------------------------------------------- dsiders · 2022-03-01 05:41 Quote from: irawan on March 01, 2022, 06:04:01 ami want to print raw data to non default printer. to reach this, i want to put all available printers on a combobox. but here my code to get printers list uses   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls,   Printers;  procedure TfMain.FormCreate(Sender: TObject); begin   cbbPrn.Items := Printer.Printers; end;          here i got access violation. win 10 x64, Lazarus 2.2.0, FPC 3.2.2. any info Did you also add the Printer4Lazarus package as a dependency in your project? https://wiki.lazarus.freepascal.org/Using_the_printer ---------------------------------------------------------------------- irawan · 2022-03-01 09:23 I add Printer4Lazarus in Project Inspector. now works well.