Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions jcl/source/vcl/JclPrint.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,12 @@ function TJclPrintSet.ReadFromCustomIni(const PrIniFile: TCustomIniFile; const S
privDataExtraSize: Integer;
DevModeDriverName: string;
DevModeDriverVersion: Word;
NewHandle: THandle;
begin
// added to fix error when switching between printers with conflicting extra details
Printer.GetPrinter(FDevice, FDriver, FPort, NewHandle);
Printer.SetPrinter(FDevice, FDriver, FPort, 0);

PrinterName := PrIniFile.ReadString(Section, PrintIniPrinterName, PrinterName);
PrinterPort := PrIniFile.ReadString(Section, PrintIniPrinterPort, PrinterPort);
Orientation := PrIniFile.ReadInteger(Section, PrintIniOrientation, Orientation);
Expand Down